You are here

public function PanelsIPEBlockContentForm::form in Panels 8.4

Same name and namespace in other branches
  1. 8.3 panels_ipe/src/Form/PanelsIPEBlockContentForm.php \Drupal\panels_ipe\Form\PanelsIPEBlockContentForm::form()

Gets the actual form array to be built.

Overrides BlockContentForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

panels_ipe/src/Form/PanelsIPEBlockContentForm.php, line 42

Class

PanelsIPEBlockContentForm

Namespace

Drupal\panels_ipe\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form['is_new'] = [
    '#type' => 'value',
    '#value' => $this->entity
      ->isNew(),
  ];

  // Wrap our form so that our submit callback can re-render the form.
  $form['#prefix'] = '<div id="panels-ipe-block-type-form-wrapper">';
  $form['#suffix'] = '</div>';
  return $form;
}