function ContextConfig::provideAs

Maps the name of a provided context.

Parameters

string $provided_context_name: The name of the provided context.

string $context_name: The context name under which the provided context should be registered.

Return value

$this

File

src/Context/ContextConfig.php, line 107

Class

ContextConfig
Class for value objects helping with context configuration.

Namespace

Drupal\rules\Context

Code

public function provideAs($provided_context_name, $context_name) {
    $this->config['provides_mapping'][$provided_context_name] = $context_name;
    return $this;
}