Action::$id

The plugin ID. Type: string File core/lib/Drupal/Core/Annotation/Action.php, line 28 Class Action Defines an Action annotation object. Namespace Drupal\Core\Annotation Code public $id;

action.module

This is the Actions module for executing stored actions. File core/modules/action/action.module Functions Name Description action_entity_type_build Implements hook_entity_type_build(). action_help Implements hook_help().

Action

Defines the configured action entity. Plugin annotation @ConfigEntityType( id = "action", label = @Translation("Action"), admin_permission = "administer actions", entity_keys = { "id" = "id", "label" = "label" }, config_export = { "id", "label", "type", "plugin", "configuration", } ) Hierarchy class \Drupal\Core\Entity\Entity implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTraitclass \Drupal\Core\Config\Entity\

Action

Defines an Action annotation object. Plugin Namespace: Plugin\Action For a working example, see \Drupal\node\Plugin\Action\UnpublishNode Hierarchy class \Drupal\Component\Annotation\Plugin implements AnnotationInterfaceclass \Drupal\Core\Annotation\Action See also \Drupal\Core\Action\ActionInterface \Drupal\Core\Action\ActionManager \Drupal\Core\Action\ActionBase Plugin API Related topics Annotations Annotations for class discovery and metadata description. File core/lib/Drupal/Core/Anno

AccountSwitcherInterface::switchTo

public AccountSwitcherInterface::switchTo(AccountInterface $account) Safely switches to another account. Each invocation of AccountSwitcherInterface::switchTo() must be matched by a corresponding invocation of AccountSwitcherInterface::switchBack() in the same function. Parameters \Drupal\Core\Session\AccountInterface $account: The account to switch to. Return value \Drupal\Core\Session\AccountSwitcherInterface $this. File core/lib/Drupal/Core/Session/AccountSwitcherInterface.php, line 25

AccountSwitcherInterface::switchBack

public AccountSwitcherInterface::switchBack() Reverts to a previous account after switching. Return value \Drupal\Core\Session\AccountSwitcherInterface $this. Throws \RuntimeException When there are no more account switches to revert. File core/lib/Drupal/Core/Session/AccountSwitcherInterface.php, line 36 Class AccountSwitcherInterface Defines an interface for a service for safe account switching. Namespace Drupal\Core\Session Code public function switchBack();

AccountSwitcher::switchTo

public AccountSwitcher::switchTo(AccountInterface $account) Safely switches to another account. Each invocation of AccountSwitcherInterface::switchTo() must be matched by a corresponding invocation of AccountSwitcherInterface::switchBack() in the same function. Parameters \Drupal\Core\Session\AccountInterface $account: The account to switch to. Return value \Drupal\Core\Session\AccountSwitcherInterface $this. Overrides AccountSwitcherInterface::switchTo File core/lib/Drupal/Core/Session/Accou

AccountSwitcher::__construct

public AccountSwitcher::__construct(AccountProxyInterface $current_user, WriteSafeSessionHandlerInterface $write_safe_handler) Constructs a new AccountSwitcher. Parameters \Drupal\Core\Session\AccountProxyInterface $current_user: The current user service. \Drupal\Core\Session\WriteSafeSessionHandlerInterface $write_safe_handler: The write-safe session handler. File core/lib/Drupal/Core/Session/AccountSwitcher.php, line 50 Class AccountSwitcher An implementation of AccountSwitcherInterface

AccountSwitcherInterface

Defines an interface for a service for safe account switching. Hierarchy interface \Drupal\Core\Session\AccountSwitcherInterface Related topics User accounts, permissions, and roles API for user accounts, access checking, roles, and permissions. File core/lib/Drupal/Core/Session/AccountSwitcherInterface.php, line 10 Namespace Drupal\Core\Session Members Name Modifiers Type Description AccountSwitcherInterface::switchBack public function Reverts to a previous account af

AccountSwitcher::$writeSafeHandler

The write-safe session handler. Type: \Drupal\Core\Session\WriteSafeSessionHandlerInterface File core/lib/Drupal/Core/Session/AccountSwitcher.php, line 33 Class AccountSwitcher An implementation of AccountSwitcherInterface. Namespace Drupal\Core\Session Code protected $writeSafeHandler;