public function Context::__construct in Plug 7
Create a context object.
Parameters
\Drupal\Component\Plugin\Context\ContextDefinitionInterface $context_definition: The context definition.
mixed|null $context_value: The value of the context.
File
- lib/
Drupal/ Component/ Plugin/ Context/ Context.php, line 41 - Contains \Drupal\Component\Plugin\Context\Context.
Class
- Context
- A generic context class for wrapping data a plugin needs to operate.
Namespace
Drupal\Component\Plugin\ContextCode
public function __construct(ContextDefinitionInterface $context_definition, $context_value = NULL) {
$this->contextDefinition = $context_definition;
$this->contextValue = $context_value;
}