Browse Source

Work on #1199. (#149)

pull/729/head
Mark Jordan 6 years ago committed by Seth Shaw
parent
commit
a956f5a4a9
  1. 4
      src/Plugin/Condition/NodeHadNamespace.php

4
src/Plugin/Condition/NodeHadNamespace.php

@ -145,8 +145,8 @@ class NodeHadNamespace extends ConditionPluginBase implements ContainerFactoryPl
* TRUE if entity has the specified namespace, otherwise FALSE. * TRUE if entity has the specified namespace, otherwise FALSE.
*/ */
protected function evaluateEntity(EntityInterface $entity) { protected function evaluateEntity(EntityInterface $entity) {
if ($entity->hasField('field_pid')) { $pid_field = $this->configuration['pid_field'];
$pid_field = $this->configuration['pid_field']; if ($entity->hasField($pid_field)) {
$pid_value = $entity->get($pid_field)->getValue(); $pid_value = $entity->get($pid_field)->getValue();
$pid = $pid_value[0]['value']; $pid = $pid_value[0]['value'];
$namespace = strtok($pid, ':') . ':'; $namespace = strtok($pid, ':') . ':';

Loading…
Cancel
Save