diff --git a/src/Entity/PathautoPattern.php b/src/Entity/PathautoPattern.php index 321948d..4f56a46 100644 --- a/src/Entity/PathautoPattern.php +++ b/src/Entity/PathautoPattern.php @@ -109,7 +109,10 @@ class PathautoPattern extends ConfigEntityBase implements PathautoPatternInterfa protected $weight = 0; /** - * @var array + * @var array[] + * Keys are context tokens, and values are arrays with the following keys: + * - label (string, optional): The human-readable label of this + * relationship. */ protected $relationships = []; @@ -217,7 +220,6 @@ class PathautoPattern extends ConfigEntityBase implements PathautoPatternInterfa foreach ($this->getRelationships() as $token => $definition) { /** @var \Drupal\ctools\TypedDataResolver $resolver */ $resolver = \Drupal::service('ctools.typed_data.resolver'); - /** @var \Drupal\pathauto\Entity\PathautoPattern $entity */ $context = $resolver->convertTokenToContext($token, $contexts); $context_definition = $context->getContextDefinition(); if (!empty($definition['label'])) { diff --git a/src/PathautoPatternInterface.php b/src/PathautoPatternInterface.php index 9493dca..ed0c7d4 100644 --- a/src/PathautoPatternInterface.php +++ b/src/PathautoPatternInterface.php @@ -120,8 +120,10 @@ interface PathautoPatternInterface extends ConfigEntityInterface { /** * Returns a list of relationships. * - * @return array - * Relationships keyed by ID, a relationship is an array with a label key. + * @return array[] + * Keys are context tokens, and values are arrays with the following keys: + * - label (string, optional): The human-readable label of this + * relationship. */ public function getRelationships();