Drupal 8  8.0.2
Plugin Class Reference
Inheritance diagram for Plugin:

Public Member Functions

 __construct ($values)
 
 get ()
 
 getProvider ()
 
 setProvider ($provider)
 
 getId ()
 
 getClass ()
 
 setClass ($class)
 

Protected Member Functions

 parse (array $values)
 

Protected Attributes

 $definition
 

Detailed Description

Defines a Plugin annotation object.

Annotations in plugin classes can use this class in order to pass various metadata about the plugin through the parser to DiscoveryInterface::getDefinitions() calls. This allows the metadata of a class to be located with the class itself, rather than in module-based info hooks.

Constructor & Destructor Documentation

__construct (   $values)

Constructs a Plugin object.

Builds up the plugin definition and invokes the get() method for any classed annotations that were used.

References NestedArray\mergeDeep(), and Plugin\parse().

Here is the call graph for this function:

Member Function Documentation

get ( )

{Gets the value of an annotation.}

Implements AnnotationInterface.

getClass ( )

{Gets the class of the annotated class.

Returns
string
}

Implements AnnotationInterface.

getId ( )

{Gets the unique ID for this annotated class.

Returns
string
}

Implements AnnotationInterface.

getProvider ( )

{Gets the name of the provider of the annotated class.

Returns
string
}

Implements AnnotationInterface.

parse ( array  $values)
protected

Parses an annotation into its definition.

Parameters
array$valuesThe annotation array.
Returns
array The parsed annotation as a definition.

Referenced by Plugin\__construct().

Here is the caller graph for this function:

setClass (   $class)

{Sets the class of the annotated class.

Parameters
string$class
}

Implements AnnotationInterface.

setProvider (   $provider)

{Sets the name of the provider of the annotated class.

Parameters
string$provider
}

Implements AnnotationInterface.


The documentation for this class was generated from the following file: