public function BackgroundImageHandlerForm::buildForm in Background Image 2.x
Same name and namespace in other branches
- 8 src/Form/BackgroundImageHandlerForm.php \Drupal\background_image\Form\BackgroundImageHandlerForm::buildForm()
- 2.0.x src/Form/BackgroundImageHandlerForm.php \Drupal\background_image\Form\BackgroundImageHandlerForm::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 EntityForm::buildForm
File
- src/
Form/ BackgroundImageHandlerForm.php, line 25
Class
- BackgroundImageHandlerForm
- Form controller for the background_image entity add/edit forms.
Namespace
Drupal\background_image\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
/** @var \Drupal\background_image\BackgroundImageInterface $background_image */
$background_image = $this->entity;
BackgroundImageForm::create($background_image, $form, $form_state, $form)
->build();
return $form;
}