You are here

public function DomainAccessEditAll::execute in Domain Access 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

domain_access/src/Plugin/Action/DomainAccessEditAll.php, line 21

Class

DomainAccessEditAll
Assigns a user to all affiliates.

Namespace

Drupal\domain_access\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity
    ->set(DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD, 1);
  $entity
    ->save();
}