class TestConfigurableContextAwarePlugin

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php \Drupal\KernelTests\Core\Plugin\Context\TestConfigurableContextAwarePlugin
  2. 11.x core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php \Drupal\KernelTests\Core\Plugin\Context\TestConfigurableContextAwarePlugin

Hierarchy

Expanded class hierarchy of TestConfigurableContextAwarePlugin

File

core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php, line 156

Namespace

Drupal\KernelTests\Core\Plugin\Context
View source
class TestConfigurableContextAwarePlugin extends PluginBase implements ConfigurableInterface, ContextAwarePluginInterface {
    use ContextAwarePluginTrait;
    
    /**
     * {@inheritdoc}
     */
    public function defaultConfiguration() {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getConfiguration() {
        return [
            'context' => [
                'nato_letter' => 'Alpha',
            ],
        ];
    }
    
    /**
     * {@inheritdoc}
     */
    public function setConfiguration(array $configuration) {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ContextAwarePluginTrait::$context protected property The data objects representing the context of this plugin.
ContextAwarePluginTrait::$initializedContextConfig protected property Tracks whether the context has been initialized from configuration.
ContextAwarePluginTrait::getCacheContexts public function 9
ContextAwarePluginTrait::getCacheMaxAge public function 7
ContextAwarePluginTrait::getCacheTags public function 4
ContextAwarePluginTrait::getContext public function
ContextAwarePluginTrait::getContextDefinition public function
ContextAwarePluginTrait::getContextDefinitions public function
ContextAwarePluginTrait::getContextMapping public function
ContextAwarePluginTrait::getContexts public function
ContextAwarePluginTrait::getContextValue public function
ContextAwarePluginTrait::getContextValues public function
ContextAwarePluginTrait::getPluginDefinition abstract public function 1
ContextAwarePluginTrait::setContext public function 1
ContextAwarePluginTrait::setContextMapping public function
ContextAwarePluginTrait::setContextValue public function
ContextAwarePluginTrait::validateContexts public function
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
TestConfigurableContextAwarePlugin::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration
TestConfigurableContextAwarePlugin::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
TestConfigurableContextAwarePlugin::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.