You are here

public function PurlModifier::evaluate in Persistent URL 8

Evaluates the condition and returns TRUE or FALSE accordingly.

Return value

bool TRUE if the condition has been met, FALSE otherwise.

Overrides ConditionInterface::evaluate

File

src/Plugin/Condition/PurlModifier.php, line 52

Class

PurlModifier
Class PurlModifier @author yourname

Namespace

Drupal\purl\Plugin\Condition

Code

public function evaluate() {
  $modifiers = $this
    ->getRequest()->attributes
    ->get('purl.matched_modifiers', []);
  return count($modifiers) > 0;
}