Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!12263
Apply 2 suggestion(s) to 1 file(s)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Apply 2 suggestion(s) to 1 file(s)
issue/drupal-3525331:3525331-simplify-widget
into
11.x
Overview
0
Commits
69
Pipelines
7
Changes
74
Open
nicxvan
requested to merge
issue/drupal-3525331:3525331-simplify-widget
into
11.x
6 days ago
Overview
0
Commits
69
Pipelines
7
Changes
74
Expand
Co-authored-by: nicxvan
29861-nicxvan@users.noreply.drupalcode.org
Closes
#3525331
0
0
Merge request reports
Compare
11.x
version 6
644f3ec4
5 days ago
version 5
4330d3d8
5 days ago
version 4
0abb1cde
5 days ago
version 3
4848d41b
6 days ago
version 2
3280a384
6 days ago
version 1
a6dbca94
6 days ago
11.x (base)
and
latest version
latest version
99e11731
69 commits,
5 days ago
version 6
644f3ec4
68 commits,
5 days ago
version 5
4330d3d8
67 commits,
5 days ago
version 4
0abb1cde
66 commits,
5 days ago
version 3
4848d41b
65 commits,
6 days ago
version 2
3280a384
64 commits,
6 days ago
version 1
a6dbca94
63 commits,
6 days ago
74 files
+
1450
−
387
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
74
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php
+
17
−
8
Options
@@ -19,29 +19,38 @@
* entities, which can come from all or specific bundles of an entity type.
*
* Properties:
* - #target_type: (required) The ID of the target entity type.
* - #tags: (optional) TRUE if the element allows multiple selection. Defaults
*
* @property $target_type
* (required) The ID of the target entity type.
* @property $tags
* (optional) TRUE if the element allows multiple selection. Defaults
* to FALSE.
* - #default_value: (optional) The default entity or an array of default
* @property $default_value
* (optional) The default entity or an array of default
* entities, depending on the value of #tags.
* - #selection_handler: (optional) The plugin ID of the entity reference
* @property $selection_handler
* (optional) The plugin ID of the entity reference
* selection handler (a plugin of type EntityReferenceSelection). The default
* value is the lowest-weighted plugin that is compatible with #target_type.
* - #selection_settings: (optional) An array of settings for the selection
* @property $selection_settings
* (optional) An array of settings for the selection
* handler. Settings for the default selection handler
* \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection are:
* - target_bundles: Array of bundles to allow (omit to allow all bundles).
* - sort: Array with 'field' and 'direction' keys, determining how results
* will be sorted. Defaults to unsorted.
* - #autocreate: (optional) Array of settings used to auto-create entities
* @property $autocreate
* (optional) Array of settings used to auto-create entities
* that do not exist (omit to not auto-create entities). Elements:
* - bundle: (required) Bundle to use for auto-created entities.
* - uid: User ID to use as the author of auto-created entities. Defaults to
* the current user.
* - #process_default_value: (optional) Set to FALSE if the #default_value
* @property $process_default_value
* (optional) Set to FALSE if the #default_value
* property is processed and access checked elsewhere (such as by a Field API
* widget). Defaults to TRUE.
* - #validate_reference: (optional) Set to FALSE if validation of the selected
* @property $validate_reference
* (optional) Set to FALSE if validation of the selected
* entities is performed elsewhere. Defaults to TRUE.
*
* Usage example:
Loading