Esempio n. 1
0
 /**
  * Creates a UserSearch object.
  *
  * @param Connection $database
  *   The database connection.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param ModuleHandlerInterface $module_handler
  *   The module handler.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The current user.
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  */
 public function __construct(Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user, array $configuration, $plugin_id, $plugin_definition)
 {
     $this->database = $database;
     $this->entityManager = $entity_manager;
     $this->moduleHandler = $module_handler;
     $this->currentUser = $current_user;
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->configuration = NestedArray::mergeDeep($this->defaultConfiguration(), $this->configuration);
 }
Esempio n. 3
0
  /**
   * Creates a UserSearch object.
   *
   * @param Connection $database
   *   The database connection.
   * @param \Drupal\advanced_help\AdvancedHelpManager $advanced_help
   *   The advanced Help manager.
   * @param \Drupal\Core\Session\AccountInterface $current_user
   *   The current user.
   * @param array $configuration
   * @param \Drupal\Core\Config\Config $search_settings
   * @param string $plugin_id
   *   The plugin_id for the plugin instance.
   * @param mixed $plugin_definition
   *   The plugin implementation definition.
   */
  public function __construct(Connection $database, AdvancedHelpManager $advanced_help, AccountInterface $current_user, Config $search_settings, array $configuration, $plugin_id, $plugin_definition) {
    $this->database = $database;
    $this->advancedHelp = $advanced_help;
    $this->currentUser = $current_user;
    $this->searchSettings = $search_settings;

    parent::__construct($configuration, $plugin_id, $plugin_definition);

    $this->addCacheTags(['user_list']);
  }