You are here

public function AssetInjectorBase::getConditionsCollection in Asset Injector 8.2

Gets conditions for this asset.

Return value

\Drupal\Core\Condition\ConditionInterface[]|\Drupal\Core\Condition\ConditionPluginCollection An array or collection of configured condition plugins.

Overrides AssetInjectorInterface::getConditionsCollection

2 calls to AssetInjectorBase::getConditionsCollection()
AssetInjectorBase::getPluginCollections in src/Entity/AssetInjectorBase.php
Gets the plugin collections used by this object.
AssetInjectorBase::setConditionsConfig in src/Entity/AssetInjectorBase.php
Sets the conditions condition configuration.

File

src/Entity/AssetInjectorBase.php, line 178

Class

AssetInjectorBase
Class AssetInjectorBase: Base asset injector class.

Namespace

Drupal\asset_injector\Entity

Code

public function getConditionsCollection() {
  if (!isset($this->conditionsCollection)) {
    $this->conditionsCollection = new ConditionPluginCollection($this
      ->conditionPluginManager(), $this
      ->get('conditions'));
  }
  return $this->conditionsCollection;
}