Пример #1
0
 /**
  * Constructs the block access control handler instance
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\Core\Executable\ExecutableManagerInterface $manager
  *   The ConditionManager for checking visibility of blocks.
  * @param \Drupal\Core\Plugin\Context\ContextHandlerInterface $context_handler
  *   The ContextHandler for applying contexts to conditions properly.
  * @param \Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository
  *   The lazy context repository service.
  */
 public function __construct(EntityTypeInterface $entity_type, ExecutableManagerInterface $manager, ContextHandlerInterface $context_handler, ContextRepositoryInterface $context_repository)
 {
     parent::__construct($entity_type);
     $this->manager = $manager;
     $this->contextHandler = $context_handler;
     $this->contextRepository = $context_repository;
 }
  public function __construct(EntityTypeInterface $entity_type, FillPdfAccessHelperInterface $access_helper, FillPdfLinkManipulatorInterface $link_manipulator, FillPdfContextManagerInterface $context_manager) {
    parent::__construct($entity_type);

    $this->accessHelper = $access_helper;
    $this->linkManipulator = $link_manipulator;
    $this->contextManager = $context_manager;
  }
 /**
  * Creates a new MenuLinkContentAccessControlHandler.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\Core\Access\AccessManagerInterface $access_manager
  *   The access manager to check routes by name.
  */
 public function __construct(EntityTypeInterface $entity_type, AccessManagerInterface $access_manager)
 {
     parent::__construct($entity_type);
     $this->accessManager = $access_manager;
 }
 /**
  * Constructs a NodeAccessControlHandler object.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\node\NodeGrantDatabaseStorageInterface $grant_storage
  *   The node grant storage.
  */
 public function __construct(EntityTypeInterface $entity_type, NodeGrantDatabaseStorageInterface $grant_storage)
 {
     parent::__construct($entity_type);
     $this->grantStorage = $grant_storage;
 }
Пример #5
0
 /**
  * Constructs an access control handler instance.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\Core\Plugin\Context\ContextHandlerInterface $context_handler
  *   The context handler.
  */
 public function __construct(EntityTypeInterface $entity_type, ContextHandlerInterface $context_handler)
 {
     parent::__construct($entity_type);
     $this->contextHandler = $context_handler;
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(EntityTypeInterface $entity_type)
 {
     parent::__construct($entity_type);
     $this->eventManager = \Drupal::service('rng.event_manager');
 }
 /**
  * Constructs a ShortcutAccessControlHandler object.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\shortcut\ShortcutSetStorageInterface $shortcut_set_storage
  *   The shortcut_set storage.
  */
 public function __construct(EntityTypeInterface $entity_type, ShortcutSetStorageInterface $shortcut_set_storage)
 {
     parent::__construct($entity_type);
     $this->shortcutSetStorage = $shortcut_set_storage;
 }
 /**
  * Constructs a NodeAccessControlHandler object.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  */
 public function __construct(EntityTypeInterface $entity_type) {
   parent::__construct($entity_type);
 }
 /**
  * Constructor
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity info for the entity type.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler.
  */
 public function __construct(EntityTypeInterface $entity_type, ModuleHandlerInterface $module_handler)
 {
     parent::__construct($entity_type);
     $this->moduleHandler = $module_handler;
 }
 /**
  * Constructs a TranslatorAccessControlHandler object.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\tmgmt\TranslatorManager $translator_manager
  *   The translator manager.
  */
 public function __construct(EntityTypeInterface $entity_type, TranslatorManager $translator_manager)
 {
     parent::__construct($entity_type);
     $this->translatorManager = $translator_manager;
 }