You are here

public function DefaultSelection::defaultConfiguration in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

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 161

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();
}