interface ContextAwarePluginDefinitionInterface implements PluginDefinitionInterface (View source)

Provides an interface for plugin definitions which use contexts.

Methods

string
id()

Gets the unique identifier of the plugin.

setClass(string $class)

Sets the class.

string
getClass()

Gets the class.

string
getProvider()

Gets the plugin provider.

bool
hasContextDefinition(string $name)

Checks if the plugin defines a particular context.

getContextDefinitions()

Returns all context definitions for this plugin.

getContextDefinition(string $name)

Returns a particular context definition for this plugin.

$this
addContextDefinition(string $name, ContextDefinitionInterface $definition)

Adds a context to this plugin definition.

$this
removeContextDefinition(string $name)

Removes a context definition from this plugin.

Details

string id()

Gets the unique identifier of the plugin.

Return Value

string

The unique identifier of the plugin.

PluginDefinitionInterface setClass(string $class)

Sets the class.

Parameters

string $class

A fully qualified class name.

Return Value

PluginDefinitionInterface

Exceptions

InvalidArgumentException

string getClass()

Gets the class.

Return Value

string

A fully qualified class name.

string getProvider()

Gets the plugin provider.

The provider is the name of the module that provides the plugin, or "core', or "component".

Return Value

string

The provider.

bool hasContextDefinition(string $name)

Checks if the plugin defines a particular context.

Parameters

string $name

The context name.

Return Value

bool

TRUE if the plugin defines the given context, otherwise FALSE.

ContextDefinitionInterface[] getContextDefinitions()

Returns all context definitions for this plugin.

Return Value

ContextDefinitionInterface[]

The context definitions.

ContextDefinitionInterface getContextDefinition(string $name)

Returns a particular context definition for this plugin.

Parameters

string $name

The context name.

Return Value

ContextDefinitionInterface

The context definition.

Exceptions

ContextException

$this addContextDefinition(string $name, ContextDefinitionInterface $definition)

Adds a context to this plugin definition.

Parameters

string $name

The context name.

ContextDefinitionInterface $definition

The context definition.

Return Value

$this

The called object.

$this removeContextDefinition(string $name)

Removes a context definition from this plugin.

Parameters

string $name

The context name.

Return Value

$this

The called object.