You are here

public function ContextProviderTrait::getProvidedContext in Rules 8.3

See also

\Drupal\rules\Context\ContextProviderInterface

1 call to ContextProviderTrait::getProvidedContext()
ContextProviderTrait::setProvidedValue in src/Context/ContextProviderTrait.php

File

src/Context/ContextProviderTrait.php, line 41

Class

ContextProviderTrait
A trait implementing the ContextProviderInterface.

Namespace

Drupal\rules\Context

Code

public function getProvidedContext($name) {

  // Check for a valid context value.
  if (!isset($this->providedContext[$name])) {
    $this->providedContext[$name] = new Context($this
      ->getProvidedContextDefinition($name));
  }
  return $this->providedContext[$name];
}