You are here

public function FreelinkingPrepopulate::defaultConfiguration in Freelinking 8.3

Same name and namespace in other branches
  1. 4.0.x modules/freelinking_prepopulate/src/Plugin/freelinking/FreelinkingPrepopulate.php \Drupal\freelinking_prepopulate\Plugin\freelinking\FreelinkingPrepopulate::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides FreelinkingPluginBase::defaultConfiguration

1 call to FreelinkingPrepopulate::defaultConfiguration()
FreelinkingPrepopulate::getConfiguration in modules/freelinking_prepopulate/src/Plugin/freelinking/FreelinkingPrepopulate.php
Gets this plugin's configuration.

File

modules/freelinking_prepopulate/src/Plugin/freelinking/FreelinkingPrepopulate.php, line 98

Class

FreelinkingPrepopulate
Freelinking prepopulate plugin.

Namespace

Drupal\freelinking_prepopulate\Plugin\freelinking

Code

public function defaultConfiguration() {
  $node_types = $this->entityTypeManager
    ->getStorage('node_type')
    ->loadMultiple();
  $default = reset($node_types);
  return [
    'settings' => [
      'default_node_type' => $default
        ->id(),
      'advanced' => [
        'title' => FALSE,
      ],
      'failover' => 'search',
    ],
  ];
}