class ActionManager

Provides an Action plugin manager.

Hierarchy

Expanded class hierarchy of ActionManager

See also

\Drupal\Core\Annotation\Operation

\Drupal\Core\Action\OperationInterface

3 files declare their use of ActionManager
ActionAddFormController.php in drupal/core/modules/action/lib/Drupal/action/ActionAddFormController.php
Contains \Drupal\action\ActionAddFormController.
ActionAdminManageForm.php in drupal/core/modules/action/lib/Drupal/action/Form/ActionAdminManageForm.php
Contains \Drupal\action\Form\ActionAdminManageForm.
ActionListController.php in drupal/core/modules/action/lib/Drupal/action/ActionListController.php
Contains \Drupal\action\ActionListController.
1 string reference to 'ActionManager'
core.services.yml in drupal/core/core.services.yml
drupal/core/core.services.yml
1 service uses ActionManager

File

drupal/core/lib/Drupal/Core/Action/ActionManager.php, line 21
Contains \Drupal\Core\Action\ActionManager.

Namespace

Drupal\Core\Action
View source
class ActionManager extends PluginManagerBase {

  /**
   * Constructs a ActionManager object.
   *
   * @param \Traversable $namespaces
   *   An object that implements \Traversable which contains the root paths
   *   keyed by the corresponding namespace to look for plugin implementations.
   */
  public function __construct(\Traversable $namespaces) {
    $this->discovery = new AnnotatedClassDiscovery('Action', $namespaces, array(), 'Drupal\\Core\\Annotation\\Action');
    $this->discovery = new AlterDecorator($this->discovery, 'action_info');
    $this->factory = new ContainerFactory($this);
  }

  /**
   * Gets the plugin definitions for this entity type.
   *
   * @param string $type
   *   The entity type name.
   *
   * @return array
   *   An array of plugin definitions for this entity type.
   */
  public function getDefinitionsByType($type) {
    return array_filter($this
      ->getDefinitions(), function ($definition) use ($type) {
      return $definition['type'] === $type;
    });
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ActionManager::getDefinitionsByType public function Gets the plugin definitions for this entity type.
ActionManager::__construct public function Constructs a ActionManager object.
PluginManagerBase::$defaults protected property A set of defaults to be referenced by $this->processDefinition() if additional processing of plugins is necessary or helpful for development purposes. 3
PluginManagerBase::$discovery protected property The object that discovers plugins managed by this manager.
PluginManagerBase::$factory protected property The object that instantiates plugins managed by this manager.
PluginManagerBase::$mapper protected property The object that returns the preconfigured plugin instance appropriate for a particular runtime condition.
PluginManagerBase::clearCachedDefinitions public function Clears static and persistent plugin definition caches. Overrides CachedDiscoveryInterface::clearCachedDefinitions
PluginManagerBase::createInstance public function Returns a preconfigured instance of a plugin. Overrides FactoryInterface::createInstance 6
PluginManagerBase::getDefinition public function Gets a specific plugin definition. Overrides DiscoveryInterface::getDefinition
PluginManagerBase::getDefinitions public function Gets the definition of all plugins for this type. Overrides DiscoveryInterface::getDefinitions
PluginManagerBase::getInstance public function Returns a preconfigured instance of a plugin. Overrides MapperInterface::getInstance 6
PluginManagerBase::processDefinition public function Performs extra processing on plugin definitions. 2