class TestConfigurableContextAwarePlugin

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Plugin/Context/ContextAwarePluginTraitTest.php \Drupal\KernelTests\Core\Plugin\Context\TestConfigurableContextAwarePlugin
  2. 10 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 127

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::getCacheContexts public function 10
ContextAwarePluginTrait::getCacheMaxAge public function 6
ContextAwarePluginTrait::getCacheTags public function 3
ContextAwarePluginTrait::getContext public function
ContextAwarePluginTrait::getContextDefinition public function
ContextAwarePluginTrait::getContextDefinitions public function
ContextAwarePluginTrait::getContextMapping public function 1
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.