Exemplo n.º 1
0
 /**
  * Constructs a new UserSelection object.
  *
  * @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.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager service.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler service.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The current user.
  * @param \Drupal\Core\Database\Connection $connection
  *   The database connection.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user, Connection $connection)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_manager, $module_handler, $current_user);
     $this->connection = $connection;
     $this->userStorage = $entity_manager->getStorage('user');
 }