function DefaultSelection::defaultConfiguration

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::defaultConfiguration()
  2. 8.9.x core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::defaultConfiguration()
  3. 11.x core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::defaultConfiguration()

Overrides SelectionPluginBase::defaultConfiguration

3 calls to DefaultSelection::defaultConfiguration()
TermSelection::defaultConfiguration in core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php
Gets default configuration for this plugin.
UserSelection::defaultConfiguration in core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php
Gets default configuration for this plugin.
WorkspaceSelection::defaultConfiguration in core/modules/workspaces/src/Plugin/EntityReferenceSelection/WorkspaceSelection.php
Gets default configuration for this plugin.
3 methods override DefaultSelection::defaultConfiguration()
TermSelection::defaultConfiguration in core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php
Gets default configuration for this plugin.
UserSelection::defaultConfiguration in core/modules/user/src/Plugin/EntityReferenceSelection/UserSelection.php
Gets default configuration for this plugin.
WorkspaceSelection::defaultConfiguration in core/modules/workspaces/src/Plugin/EntityReferenceSelection/WorkspaceSelection.php
Gets default configuration for this plugin.

File

core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php, line 142

Class

DefaultSelection
Default plugin implementation of the Entity Reference Selection plugin.

Namespace

Drupal\Core\Entity\Plugin\EntityReferenceSelection

Code

public function defaultConfiguration() {
    return [
        // For the 'target_bundles' setting, a NULL value is equivalent to "allow
        // entities from any bundle to be referenced" and an empty array value is
        // equivalent to "no entities from any bundle can be referenced".
'target_bundles' => NULL,
        'sort' => [
            'field' => '_none',
            'direction' => 'ASC',
        ],
        'auto_create' => FALSE,
        'auto_create_bundle' => NULL,
    ] + parent::defaultConfiguration();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.