EntityAutocomplete::processEntityAutocomplete

public static EntityAutocomplete::processEntityAutocomplete(array &$element, FormStateInterface $form_state, array &$complete_form) Adds entity autocomplete functionality to a form element. Parameters array $element: The form element to process. Properties used: #target_type: The ID of the target entity type. #selection_handler: The plugin ID of the entity reference selection handler. #selection_settings: An array of settings that will be passed to the selection handler. \Drupal\C

EntityAutocomplete::matchEntityByTitle

protected static EntityAutocomplete::matchEntityByTitle(SelectionInterface $handler, $input, array &$element, FormStateInterface $form_state, $strict) Finds an entity from an autocomplete input without an explicit ID. The method will return an entity ID if one single entity unambuguously matches the incoming input, and sill assign form errors otherwise. Parameters \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface $handler: Entity reference selection plugin. string $input: Sin

EntityAutocomplete::getInfo

public EntityAutocomplete::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides Textfield::getInfo File core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php, line 27 Class EntityAutocomplete Provides an entity autocomplete form element. Namespace Drupal\Core\Enti

EntityAutocomplete::getEntityLabels

public static EntityAutocomplete::getEntityLabels(array $entities) Converts an array of entity objects into a string of entity labels. This method is also responsible for checking the 'view label' access on the passed-in entities. Parameters \Drupal\Core\Entity\EntityInterface[] $entities: An array of entity objects. Return value string A string of entity labels separated by commas. File core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php, line 320 Class EntityAutocomplete Provide

EntityAutocomplete::extractEntityIdFromAutocompleteInput

public static EntityAutocomplete::extractEntityIdFromAutocompleteInput($input) Extracts the entity ID from the autocompletion result. Parameters string $input: The input coming from the autocompletion result. Return value mixed|null An entity ID or NULL if the input does not contain one. File core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php, line 348 Class EntityAutocomplete Provides an entity autocomplete form element. Namespace Drupal\Core\Entity\Element Code public stati

EntityAutocomplete

Provides an entity autocomplete form element. The #default_value accepted by this element is either an entity object or an array of entity objects. Plugin annotation @FormElement("entity_autocomplete") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\RenderElement implements ElementInterfaceclass \D

EntityAccessControlHandlerInterface::setModuleHandler

public EntityAccessControlHandlerInterface::setModuleHandler(ModuleHandlerInterface $module_handler) Sets the module handler for this access control handler. Parameters \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler. Return value $this File core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php, line 78 Class EntityAccessControlHandlerInterface Defines an interface for entity access control handlers. Namespace Drupal\Core\Entity Code pu

EntityAccessControlHandlerInterface::resetCache

public EntityAccessControlHandlerInterface::resetCache() Clears all cached access checks. File core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php, line 68 Class EntityAccessControlHandlerInterface Defines an interface for entity access control handlers. Namespace Drupal\Core\Entity Code public function resetCache();

EntityAccessControlHandlerInterface::fieldAccess

public EntityAccessControlHandlerInterface::fieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account = NULL, FieldItemListInterface $items = NULL, $return_as_object = FALSE) Checks access to an operation on a given entity field. This method does not determine whether access is granted to the entity itself, only the specific field. Callers are responsible for ensuring that entity access is also respected, for example by using \Drupal\Core\Entity\EntityAccessC

EntityAccessControlHandlerInterface::createAccess

public EntityAccessControlHandlerInterface::createAccess($entity_bundle = NULL, AccountInterface $account = NULL, array $context = array(), $return_as_object = FALSE) Checks access to create an entity. Parameters string $entity_bundle: (optional) The bundle of the entity. Required if the entity supports bundles, defaults to NULL otherwise. \Drupal\Core\Session\AccountInterface $account: (optional) The user session for which to check access, or NULL to check access for the current user. Default