You are here

public function ViewmodepagePattern::addSelectionCondition in View Mode Page 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Entity/ViewmodepagePattern.php \Drupal\view_mode_page\Entity\ViewmodepagePattern::addSelectionCondition()
  2. 3.2.x src/Entity/ViewmodepagePattern.php \Drupal\view_mode_page\Entity\ViewmodepagePattern::addSelectionCondition()

Adds selection criteria.

Parameters

array $configuration: Configuration of the selection criteria.

Return value

string The condition id of the new criteria.

Overrides ViewmodepagePatternInterface::addSelectionCondition

File

src/Entity/ViewmodepagePattern.php, line 292

Class

ViewmodepagePattern
Defines the Viewmodepage pattern entity.

Namespace

Drupal\view_mode_page\Entity

Code

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