You are here

public function ArrayPluginDefinitionDecorator::hasContextDefinition in Plugin 8.2

Checks if a specific context definition exists.

Parameters

string $name: The name of the context in the plugin definition.

Return value

bool Whether the context definition exists.

Overrides PluginContextDefinitionInterface::hasContextDefinition

1 call to ArrayPluginDefinitionDecorator::hasContextDefinition()
ArrayPluginDefinitionDecorator::getContextDefinition in src/PluginDefinition/ArrayPluginDefinitionDecorator.php
Gets a specific context definition.

File

src/PluginDefinition/ArrayPluginDefinitionDecorator.php, line 260

Class

ArrayPluginDefinitionDecorator
Provides a plugin definition based on an array.

Namespace

Drupal\plugin\PluginDefinition

Code

public function hasContextDefinition($name) {
  return isset($this->arrayDefinition['context'][$name]);
}