You are here

public function SolrReloadCoreForm::buildForm in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 modules/search_api_solr_admin/src/Form/SolrReloadCoreForm.php \Drupal\search_api_solr_admin\Form\SolrReloadCoreForm::buildForm()
  2. 4.x modules/search_api_solr_admin/src/Form/SolrReloadCoreForm.php \Drupal\search_api_solr_admin\Form\SolrReloadCoreForm::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

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

Return value

array The form structure.

Overrides FormInterface::buildForm

File

modules/search_api_solr_admin/src/Form/SolrReloadCoreForm.php, line 44

Class

SolrReloadCoreForm
The core reload form.

Namespace

Drupal\search_api_solr_admin\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, ServerInterface $search_api_server = NULL) {
  $this->search_api_server = $search_api_server;
  $core = $search_api_server
    ->getBackendConfig()['connector_config']['core'];
  $form['#title'] = $this
    ->t('Reload core %core', [
    '%core' => $core,
  ]);
  $form['actions'] = [
    'submit' => [
      '#type' => 'submit',
      '#value' => $this
        ->t('Reload'),
    ],
  ];
  return $form;
}