You are here

public function ViewmodepagePattern::getSelectionConditions in View Mode Page 8.3

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

Gets the selection condition collection.

Return value

\Drupal\Core\Condition\ConditionInterface[]|\Drupal\Core\Condition\ConditionPluginCollection Returns a array/collection of condition objects

Overrides ViewmodepagePatternInterface::getSelectionConditions

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

File

src/Entity/ViewmodepagePattern.php, line 282

Class

ViewmodepagePattern
Defines the Viewmodepage pattern entity.

Namespace

Drupal\view_mode_page\Entity

Code

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