|
|
@ -11,7 +11,7 @@ use Drupal\field\Entity\FieldStorageConfig; |
|
|
|
use Symfony\Component\DependencyInjection\ContainerInterface; |
|
|
|
use Symfony\Component\DependencyInjection\ContainerInterface; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Condition to detect if is a node is referenced by another node using the configured field. |
|
|
|
* Condition for a node referenced by another node using the configured field. |
|
|
|
* |
|
|
|
* |
|
|
|
* @Condition( |
|
|
|
* @Condition( |
|
|
|
* id = "node_referenced_by_node", |
|
|
|
* id = "node_referenced_by_node", |
|
|
@ -140,10 +140,10 @@ class NodeReferencedByNode extends ConditionPluginBase implements ContainerFacto |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function summary() { |
|
|
|
public function summary() { |
|
|
|
if (!empty($this->configuration['negate'])) { |
|
|
|
if (!empty($this->configuration['negate'])) { |
|
|
|
return $this->t('The node is not referenced in another node\'s field `@field`.', ['@field' => $this->configuration['reference_field']]); |
|
|
|
return $this->t("The node is not referenced in another node's field `@field`.", ['@field' => $this->configuration['reference_field']]); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
return $this->t('The node is referenced in another node\'s field `@field`.', ['@field' => $this->configuration['reference_field']]); |
|
|
|
return $this->t("The node is referenced in another node's field `@field`.", ['@field' => $this->configuration['reference_field']]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|