|
|
@ -41,6 +41,7 @@ class UriExtractor { |
|
|
|
public function extractUri(?object $input): ?string { |
|
|
|
public function extractUri(?object $input): ?string { |
|
|
|
$entity = $input; |
|
|
|
$entity = $input; |
|
|
|
if ($input instanceof EntityReferenceFieldItemListInterface) { |
|
|
|
if ($input instanceof EntityReferenceFieldItemListInterface) { |
|
|
|
|
|
|
|
/** @var \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem $item */ |
|
|
|
if ($item = $input->first()) { |
|
|
|
if ($item = $input->first()) { |
|
|
|
$entity = $item->entity; |
|
|
|
$entity = $item->entity; |
|
|
|
} |
|
|
|
} |
|
|
|