W3cubDocs

/Drupal 8

class ContextDefinition

Defines a context definition annotation object.

Some plugins require various data contexts in order to function. This class supports that need by allowing the contexts to be easily defined within an annotation and return a ContextDefinitionInterface implementing class.

Hierarchy

Related topics

Annotation for context definition
Describes how to use ContextDefinition annotation.
Annotations
Annotations for class discovery and metadata description.

File

core/lib/Drupal/Core/Annotation/ContextDefinition.php, line 74

Namespace

Drupal\Core\Annotation

Members

Name Modifiers Type Description
ContextDefinition::$definition protected property The ContextDefinitionInterface object. Overrides Plugin::$definition
ContextDefinition::get public function Returns the value of an annotation. Overrides Plugin::get
ContextDefinition::__construct public function Constructs a new context definition object. Overrides Plugin::__construct
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Annotation!ContextDefinition.php/class/ContextDefinition/8.1.x