You are here

public function PathautoPattern::addSelectionCondition in Pathauto 8

Adds selection criteria.

Parameters

array $configuration: Configuration of the selection criteria.

Return value

string The condition id of the new criteria.

Overrides PathautoPatternInterface::addSelectionCondition

File

src/Entity/PathautoPattern.php, line 305

Class

PathautoPattern
Defines the Pathauto pattern entity.

Namespace

Drupal\pathauto\Entity

Code

public function addSelectionCondition(array $configuration) {
  $configuration['uuid'] = $this
    ->uuidGenerator()
    ->generate();
  $this
    ->getSelectionConditions()
    ->addInstanceId($configuration['uuid'], $configuration);
  return $configuration['uuid'];
}