public function ActionManager::getDefinitionsByType

public ActionManager::getDefinitionsByType($type)

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;
  });
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Action!ActionManager.php/function/ActionManager::getDefinitionsByType/8.1.x