You are here

public function Context::getConditions in Context 8.4

Same name and namespace in other branches
  1. 8 src/Entity/Context.php \Drupal\context\Entity\Context::getConditions()
  2. 8.0 src/Entity/Context.php \Drupal\context\Entity\Context::getConditions()

Get a list of all conditions.

Return value

\Drupal\Core\Condition\ConditionInterface[]|ConditionPluginCollection The plugin collection.

Overrides ContextInterface::getConditions

2 calls to Context::getConditions()
Context::calculateDependencies in src/Entity/Context.php
Calculates dependencies and stores them in the dependency property.
Context::getPluginCollections in src/Entity/Context.php
Gets the plugin collections used by this entity.

File

src/Entity/Context.php, line 256

Class

Context
Defines the Context entity.

Namespace

Drupal\context\Entity

Code

public function getConditions() {
  if (!$this->conditionsCollection) {
    $conditionManager = Drupal::service('plugin.manager.condition');
    $this->conditionsCollection = new ConditionPluginCollection($conditionManager, $this->conditions);
  }
  return $this->conditionsCollection;
}