DomainAccessEditAll.php in Domain Access 8
Namespace
Drupal\domain_access\Plugin\ActionFile
domain_access/src/Plugin/Action/DomainAccessEditAll.phpView source
<?php
namespace Drupal\domain_access\Plugin\Action;
use Drupal\domain_access\DomainAccessManagerInterface;
/**
* Assigns a user to all affiliates.
*
* @Action(
* id = "domain_access_edit_all_action",
* label = @Translation("Assign editors to all affiliates"),
* type = "user"
* )
*/
class DomainAccessEditAll extends DomainAccessActionBase {
/**
* {@inheritdoc}
*/
public function execute($entity = NULL) {
$entity
->set(DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD, 1);
$entity
->save();
}
}
Classes
Name![]() |
Description |
---|---|
DomainAccessEditAll | Assigns a user to all affiliates. |