public function UserSelection::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php \Drupal\user\Plugin\EntityReferenceSelection\UserSelection::__construct()
Constructs a new UserSelection object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Session\AccountInterface $current_user: The current user.
\Drupal\Core\Database\Connection $connection: The database connection.
Overrides DefaultSelection::__construct
File
- core/
modules/ user/ src/ Plugin/ EntityReferenceSelection/ UserSelection.php, line 65 - Contains \Drupal\user\Plugin\EntityReferenceSelection\UserSelection.
Class
- UserSelection
- Provides specific access control for the user entity type.
Namespace
Drupal\user\Plugin\EntityReferenceSelectionCode
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');
}