You are here

public function PathautoPattern::getSelectionConditions in Pathauto 8

Gets the selection condition collection.

Return value

\Drupal\Core\Condition\ConditionInterface[]|\Drupal\Core\Condition\ConditionPluginCollection

Overrides PathautoPatternInterface::getSelectionConditions

3 calls to PathautoPattern::getSelectionConditions()
PathautoPattern::applies in src/Entity/PathautoPattern.php
Determines if this pattern can apply a given object.
PathautoPattern::calculateDependencies in src/Entity/PathautoPattern.php
Calculates dependencies and stores them in the dependency property.
PathautoPattern::preSave in src/Entity/PathautoPattern.php
Not using core's default logic around ConditionPluginCollection since it incorrectly assumes no condition will ever be applied twice.

File

src/Entity/PathautoPattern.php, line 295

Class

PathautoPattern
Defines the Pathauto pattern entity.

Namespace

Drupal\pathauto\Entity

Code

public function getSelectionConditions() {
  if (!$this->selectionConditionCollection) {
    $this->selectionConditionCollection = new ConditionPluginCollection(\Drupal::service('plugin.manager.condition'), $this
      ->get('selection_criteria'));
  }
  return $this->selectionConditionCollection;
}