Browse Source

Document magic properties in extractor services

merge-requests/17/head
Chi 2 years ago
parent
commit
8b33f99a8f
  1. 1
      src/UriExtractor.php
  2. 1
      src/UrlExtractor.php

1
src/UriExtractor.php

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

1
src/UrlExtractor.php

@ -64,6 +64,7 @@ class UrlExtractor {
$entity = $input;
if ($input instanceof EntityReferenceFieldItemListInterface) {
/** @var \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem $item */
if ($item = $input->first()) {
$entity = $item->entity;
}

Loading…
Cancel
Save