class ConfigurableActionBase

Same name in other branches
  1. 9 core/lib/Drupal/Core/Action/ConfigurableActionBase.php \Drupal\Core\Action\ConfigurableActionBase
  2. 10 core/lib/Drupal/Core/Action/ConfigurableActionBase.php \Drupal\Core\Action\ConfigurableActionBase
  3. 11.x core/lib/Drupal/Core/Action/ConfigurableActionBase.php \Drupal\Core\Action\ConfigurableActionBase

Provides a base implementation for a configurable Action plugin.

Hierarchy

Expanded class hierarchy of ConfigurableActionBase

8 files declare their use of ConfigurableActionBase
ActionAjaxTest.php in core/modules/action/tests/action_form_ajax_test/src/Plugin/Action/ActionAjaxTest.php
AssignOwnerNode.php in core/modules/node/src/Plugin/Action/AssignOwnerNode.php
ChangeUserRoleBase.php in core/modules/user/src/Plugin/Action/ChangeUserRoleBase.php
EmailAction.php in core/lib/Drupal/Core/Action/Plugin/Action/EmailAction.php
GotoAction.php in core/lib/Drupal/Core/Action/Plugin/Action/GotoAction.php

... See full list

File

core/lib/Drupal/Core/Action/ConfigurableActionBase.php, line 14

Namespace

Drupal\Core\Action
View source
abstract class ConfigurableActionBase extends ActionBase implements ConfigurableInterface, DependentPluginInterface, ConfigurablePluginInterface, PluginFormInterface {
    
    /**
     * {@inheritdoc}
     */
    public function __construct(array $configuration, $plugin_id, $plugin_definition) {
        parent::__construct($configuration, $plugin_id, $plugin_definition);
        $this->setConfiguration($configuration);
    }
    
    /**
     * {@inheritdoc}
     */
    public function defaultConfiguration() {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function getConfiguration() {
        return $this->configuration;
    }
    
    /**
     * {@inheritdoc}
     */
    public function setConfiguration(array $configuration) {
        $this->configuration = $configuration + $this->defaultConfiguration();
    }
    
    /**
     * {@inheritdoc}
     */
    public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
    }
    
    /**
     * {@inheritdoc}
     */
    public function calculateDependencies() {
        return [];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ActionBase::executeMultiple public function Executes the plugin for an array of objects. Overrides ActionInterface::executeMultiple 3
ActionInterface::access public function Checks object access. 19
ConfigurableActionBase::calculateDependencies public function Calculates dependencies for the configured plugin. Overrides DependentPluginInterface::calculateDependencies 1
ConfigurableActionBase::defaultConfiguration public function Gets default configuration for this plugin. Overrides ConfigurableInterface::defaultConfiguration 8
ConfigurableActionBase::getConfiguration public function Gets this plugin's configuration. Overrides ConfigurableInterface::getConfiguration
ConfigurableActionBase::setConfiguration public function Sets the configuration for this plugin instance. Overrides ConfigurableInterface::setConfiguration
ConfigurableActionBase::validateConfigurationForm public function Form validation handler. Overrides PluginFormInterface::validateConfigurationForm 2
ConfigurableActionBase::__construct public function 6
ExecutableInterface::execute public function Executes the plugin. 21
PluginFormInterface::buildConfigurationForm public function Form constructor. 32
PluginFormInterface::submitConfigurationForm public function Form submission handler. 31
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2

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