You are here

public function Search::settingsForm in Freelinking 8.3

Same name and namespace in other branches
  1. 4.0.x src/Plugin/freelinking/Search.php \Drupal\freelinking\Plugin\freelinking\Search::settingsForm()

Plugin configuration form.

Parameters

array $form: The form element array for the filter plugin.

\Drupal\Core\Form\FormStateInterface $form_state: The form state of the parent form.

Return value

array The configuration form to attach to Freelinking settings form.

Overrides FreelinkingPluginBase::settingsForm

File

src/Plugin/freelinking/Search.php, line 79

Class

Search
Freelinking search plugin.

Namespace

Drupal\freelinking\Plugin\freelinking

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
  $element['failover'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Failover Option'),
    '#description' => $this
      ->t('If Search is disabled or inaccessible do something else.'),
    '#options' => [
      'error' => $this
        ->t('Error Message'),
      'google' => $this
        ->t('Google'),
    ],
  ];
  return $element;
}