trait SelectionTrait (View source)

Provides common methods and injects services for core selection handlers.

Properties

protected EntityManagerInterface $entityManager

The entity manager service.

protected ModuleHandlerInterface $moduleHandler

The module handler service.

protected AccountInterface $currentUser

The current user.

Methods

__construct(array $configuration, string $plugin_id, mixed $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user)

Constructs a new selection object.

static 
create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)

{@inheritdoc}

Details

__construct(array $configuration, string $plugin_id, mixed $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user)

Constructs a new selection 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.

EntityManagerInterface $entity_manager

The entity manager service.

ModuleHandlerInterface $module_handler

The module handler service.

AccountInterface $current_user

The current user.

static create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)

{@inheritdoc}

Parameters

ContainerInterface $container
array $configuration
$plugin_id
$plugin_definition