Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Action/ActionManager.php
- 9 core/lib/Drupal/Core/Action/ActionManager.php
Namespace
Drupal\Core\Action
File
core/lib/Drupal/Core/Action/ActionManager.php
View source
<?php
namespace Drupal\Core\Action;
use Drupal\Component\Plugin\CategorizingPluginManagerInterface;
use Drupal\Core\Action\Attribute\Action;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\CategorizingPluginManagerTrait;
use Drupal\Core\Plugin\DefaultPluginManager;
class ActionManager extends DefaultPluginManager implements CategorizingPluginManagerInterface {
use CategorizingPluginManagerTrait;
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Action', $namespaces, $module_handler, 'Drupal\\Core\\Action\\ActionInterface', Action::class, 'Drupal\\Core\\Annotation\\Action');
$this
->alterInfo('action_info');
$this
->setCacheBackend($cache_backend, 'action_info');
}
public function getDefinitionsByType($type) {
return array_filter($this
->getDefinitions(), function ($definition) use ($type) {
return $definition['type'] === $type;
});
}
}
Classes