public function SavedSearchCreateForm::form in Search API Saved Searches 8
Gets the actual form array to be built.
Overrides ContentEntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
Form/ SavedSearchCreateForm.php, line 16
Class
- SavedSearchCreateForm
- Provides a form for saving a search.
Namespace
Drupal\search_api_saved_searches\FormCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
$bundle = $this->entity
->bundle();
$id = "search-api-saved-searches-save-{$bundle}-form-wrapper";
$form['#prefix'] = "<div id=\"{$id}\">";
$form['#suffix'] = '</div>';
return $form;
}