YamlFormEntityFilterForm.php in YAML Form 8
File
src/Form/YamlFormEntityFilterForm.php
View source
<?php
namespace Drupal\yamlform\Form;
use Drupal\Core\Form\FormStateInterface;
class YamlFormEntityFilterForm extends YamlFormFilterFormBase {
public function getFormId() {
return 'yamlform_filter_form';
}
public function buildForm(array $form, FormStateInterface $form_state, $search = NULL, $state = NULL, $state_options = []) {
$form = parent::buildForm($form, $form_state, $search, $state, $state_options);
$form['filter']['#title'] = $this
->t('Filter forms');
$form['filter']['search']['#title'] = $this
->t('Filter by title, description, or elements');
$form['filter']['search']['#autocomplete_route_name'] = 'entity.yamlform.autocomplete';
$form['filter']['search']['#placeholder'] = $this
->t('Filter by title, description, or elements');
return $form;
}
}