Actions

Provides a wrapper element to group one or more buttons in a form. Use of a single Actions element with an array key of 'actions' to group the primary submit buttons on a form helps to ensure proper styling in themes, and enables other modules to properly alter a form's actions. Usage example: $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => $this->t('Save'), ); Plugin annotation @RenderElement("actions") Hier

ActionManager::__construct

public ActionManager::__construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) Constructs a new class instance. Parameters \Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations. \Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use. \Drupal\Core\Extension\ModuleHandlerInterface $module_handle

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) us

ActionManager

Provides an Action plugin manager. Hierarchy class \Drupal\Component\Plugin\PluginManagerBase implements PluginManagerInterface uses DiscoveryTraitclass \Drupal\Core\Plugin\DefaultPluginManager implements CachedDiscoveryInterface, PluginManagerInterface, CacheableDependencyInterface uses DiscoveryCachedTrait, UseCacheBackendTraitclass \Drupal\Core\Action\ActionManager implements CategorizingPluginManagerInterface uses CategorizingPluginManagerTrait See also \Drupal\Core\Annotation\Action

ActionListBuilder::__construct

public ActionListBuilder::__construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ActionManager $action_manager) Constructs a new ActionListBuilder object. Parameters \Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition. \Drupal\Core\Entity\EntityStorageInterface $storage: The action storage. \Drupal\Core\Action\ActionManager $action_manager: The action plugin manager. Overrides EntityListBuilder::__construct File core/modules/action/src/Actio

ActionListBuilder::render

public ActionListBuilder::render() Builds the entity listing as renderable array for table.html.twig. @todo Add a link to add a new item to the #empty text. Overrides EntityListBuilder::render File core/modules/action/src/ActionListBuilder.php, line 110 Class ActionListBuilder Defines a class to build a listing of action entities. Namespace Drupal\action Code public function render() { $build['action_header']['#markup'] = '<h3>' . $this->t('Available actions:') . '</h3&g

ActionListBuilder::load

public ActionListBuilder::load() Loads entities of this type from storage for listing. This allows the implementation to manipulate the listing, like filtering or sorting the loaded entities. Return value \Drupal\Core\Entity\EntityInterface[] An array of entities implementing \Drupal\Core\Entity\EntityInterface. Overrides ConfigEntityListBuilder::load File core/modules/action/src/ActionListBuilder.php, line 62 Class ActionListBuilder Defines a class to build a listing of action entities.

ActionListBuilder::getDefaultOperations

public ActionListBuilder::getDefaultOperations(EntityInterface $entity) Gets this list's default operations. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity the operations are for. Return value array The array structure is identical to the return value of self::getOperations(). Overrides ConfigEntityListBuilder::getDefaultOperations File core/modules/action/src/ActionListBuilder.php, line 99 Class ActionListBuilder Defines a class to build a listing of action entities.

ActionListBuilder::createInstance

public static ActionListBuilder::createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) Instantiates a new instance of this entity handler. This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton. Parameters \Symfony\Component\Depende

ActionListBuilder::buildRow

public ActionListBuilder::buildRow(EntityInterface $entity) Builds a row for an entity in the entity listing. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list. Return value array A render array structure of fields for this entity. Overrides EntityListBuilder::buildRow See also \Drupal\Core\Entity\EntityListBuilder::render() File core/modules/action/src/ActionListBuilder.php, line 76 Class ActionListBuilder Defines a class to build a listing of