function RulesActionBase::getContextValue

Overrides ContextAwarePluginInterface::getContextValue

6 calls to RulesActionBase::getContextValue()
DataConvert::refineContextDefinitions in src/Plugin/RulesAction/DataConvert.php
Refines used and provided context definitions based upon context values.
EntityCreate::refineContextDefinitions in src/Plugin/RulesAction/EntityCreate.php
Refines used and provided context definitions based upon context values.
EntityFetchByField::refineContextDefinitions in src/Plugin/RulesAction/EntityFetchByField.php
Refines used and provided context definitions based upon context values.
EntityFetchById::refineContextDefinitions in src/Plugin/RulesAction/EntityFetchById.php
Refines used and provided context definitions based upon context values.
RulesActionBase::execute in src/Core/RulesActionBase.php
Executes the plugin.

... See full list

File

src/Core/RulesActionBase.php, line 33

Class

RulesActionBase
Base class for rules actions.

Namespace

Drupal\rules\Core

Code

public function getContextValue($name) {
    try {
        return $this->traitGetContextValue($name);
    } catch (ContextException $e) {
        // Catch the undocumented exception thrown when no context value is set
        // for a required context.
        // @todo Remove once https://www.drupal.org/node/2677162 is fixed.
        if (strpos($e->getMessage(), 'context is required') === FALSE) {
            throw $e;
        }
    }
}