function ActionManager::getDefinitionsByType

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Action/ActionManager.php \Drupal\Core\Action\ActionManager::getDefinitionsByType()
  2. 10 core/lib/Drupal/Core/Action/ActionManager.php \Drupal\Core\Action\ActionManager::getDefinitionsByType()
  3. 11.x core/lib/Drupal/Core/Action/ActionManager.php \Drupal\Core\Action\ActionManager::getDefinitionsByType()

Gets the plugin definitions for this entity type.

Parameters

string $type: The entity type name.

Return value

array An array of plugin definitions for this entity type.

File

core/lib/Drupal/Core/Action/ActionManager.php, line 49

Class

ActionManager
Provides an Action plugin manager.

Namespace

Drupal\Core\Action

Code

public function getDefinitionsByType($type) {
    return array_filter($this->getDefinitions(), function ($definition) use ($type) {
        return $definition['type'] === $type;
    });
}

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