You are here

public function TemplateListBuilder::buildForm in Wysiwyg API template plugin 8.2

Same name and namespace in other branches
  1. 3.0.x src/TemplateListBuilder.php \Drupal\wysiwyg_template\TemplateListBuilder::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 DraggableListBuilder::buildForm

File

src/TemplateListBuilder.php, line 40

Class

TemplateListBuilder
Provides a listing of Template entities.

Namespace

Drupal\wysiwyg_template

Code

public function buildForm(array $form, FormStateInterface $form_state) : array {
  $form = parent::buildForm($form, $form_state);

  // Better empty text.
  $form[$this->entitiesKey]['#empty'] = $this
    ->t('There are no WYSIWYG templates yet.');
  return $form;
}