Drupal 8  8.0.2
UserSelection Class Reference
Inheritance diagram for UserSelection:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user, Connection $connection)
 
 buildConfigurationForm (array $form, FormStateInterface $form_state)
 
 entityQueryAlter (SelectInterface $query)
 
- Public Member Functions inherited from DefaultSelection
 __construct (array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user)
 
 buildConfigurationForm (array $form, FormStateInterface $form_state)
 
 validateConfigurationForm (array &$form, FormStateInterface $form_state)
 
 submitConfigurationForm (array &$form, FormStateInterface $form_state)
 
 getReferenceableEntities ($match=NULL, $match_operator= 'CONTAINS', $limit=0)
 
 countReferenceableEntities ($match=NULL, $match_operator= 'CONTAINS')
 
 validateReferenceableEntities (array $ids)
 
 createNewEntity ($entity_type_id, $bundle, $label, $uid)
 
 validateReferenceableNewEntities (array $entities)
 
 entityQueryAlter (SelectInterface $query)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Static Public Member Functions inherited from DefaultSelection
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
static elementValidateFilter (&$element, FormStateInterface $form_state)
 

Protected Member Functions

 buildEntityQuery ($match=NULL, $match_operator= 'CONTAINS')
 
- Protected Member Functions inherited from DefaultSelection
 buildEntityQuery ($match=NULL, $match_operator= 'CONTAINS')
 
 reAlterQuery (AlterableInterface $query, $tag, $base_table)
 

Protected Attributes

 $connection
 
 $userStorage
 
- Protected Attributes inherited from DefaultSelection
 $entityManager
 
 $moduleHandler
 
 $currentUser
 

Detailed Description

Provides specific access control for the user entity type.

( id = "default:user", label = ("User selection"), entity_types = {"user"}, group = "default", weight = 1 )

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
EntityManagerInterface  $entity_manager,
ModuleHandlerInterface  $module_handler,
AccountInterface  $current_user,
Connection  $connection 
)

Constructs a new UserSelection object.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager service.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler service.
\Drupal\Core\Session\AccountInterface$current_userThe current user.
\Drupal\Core\Database\Connection$connectionThe database connection.

References EntityTypeManagerInterface\getStorage().

Here is the call graph for this function:

Member Function Documentation

buildConfigurationForm ( array  $form,
FormStateInterface  $form_state 
)

{Form constructor.Plugin forms are embedded in other forms. In order to know where the plugin form is located in the parent form, #parents and #array_parents must be known, but these are not available during the initial build phase. In order to have these properties available when building the plugin form's elements, let this method return a form element that has a #process callback and build the rest of the form in the callback. By the time the callback is executed, the element's #parents and #array_parents properties will have been set by the form API. For more documentation on #parents and #array_parents, see .

Parameters
array$formAn associative array containing the initial structure of the plugin form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the complete form.
Returns
array The form structure.
}

Implements PluginFormInterface.

References RoleInterface\AUTHENTICATED_ID, and t().

Here is the call graph for this function:

buildEntityQuery (   $match = NULL,
  $match_operator = 'CONTAINS' 
)
protected

{}

References Drupal\currentUser().

Here is the call graph for this function:

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

{Creates an instance of the plugin.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
Returns
static Returns an instance of this plugin.
}

Implements ContainerFactoryPluginInterface.

entityQueryAlter ( SelectInterface  $query)

{Allows the selection to alter the SelectQuery generated by EntityFieldQuery.

Parameters
\Drupal\Core\Database\Query\SelectInterface$queryA Select Query object.
}

Implements SelectionInterface.

References ConditionInterface\condition(), ConditionInterface\conditions(), Drupal\config(), Drupal\currentUser(), db_and(), and db_or().

Here is the call graph for this function:


The documentation for this class was generated from the following file: