function Action::__construct

Same name in other branches
  1. 10 core/lib/Drupal/Core/Action/Attribute/Action.php \Drupal\Core\Action\Attribute\Action::__construct()

Constructs an Action attribute.

Parameters

string $id: The plugin ID.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $label: The label of the action.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $action_label: (optional) A label that can be used by the action deriver.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $category: (optional) The category under which the action should be listed in the UI.

class-string|null $deriver: (optional) The deriver class.

string|null $confirm_form_route_name: (optional) The route name for a confirmation form for this action.

string|null $type: (optional) The entity type the action can apply to.

Overrides Plugin::__construct

File

core/lib/Drupal/Core/Action/Attribute/Action.php, line 41

Class

Action
Defines an Action attribute object.

Namespace

Drupal\Core\Action\Attribute

Code

public function __construct(string $id, ?TranslatableMarkup $label = NULL, ?TranslatableMarkup $action_label = NULL, ?TranslatableMarkup $category = NULL, ?string $deriver = NULL, ?string $confirm_form_route_name = NULL, ?string $type = NULL) {
}

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