class BlockTokenPermissions in Block Token 8
Hierarchy
- class \Drupal\block_token\BlockTokenPermissions implements ContainerInjectionInterface
Expanded class hierarchy of BlockTokenPermissions
File
- src/
BlockTokenPermissions.php, line 11
Namespace
Drupal\block_tokenView source
class BlockTokenPermissions implements ContainerInjectionInterface {
// use StringTranslationTrait;
/**
* The entity manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityManager;
/**
* Constructs a new instance.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager
* The entity manager.
*/
public function __construct(EntityTypeManagerInterface $entity_manager) {
$this->entityManager = $entity_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('entity.manager'));
}
public static function permissions() {
$perms = [];
$perms['administer block token'] = array(
'title' => t('Administer block tokens'),
'description' => t('Turn on/off the block token generation per block.(This gives permission to View/Edit/Save block forms.)'),
);
return $perms;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockTokenPermissions:: |
protected | property | The entity manager. | |
BlockTokenPermissions:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
BlockTokenPermissions:: |
public static | function | ||
BlockTokenPermissions:: |
public | function | Constructs a new instance. |