You are here

protected static function ModalForm::getDataDialogOptions in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/form_api_example/src/Form/ModalForm.php \Drupal\form_api_example\Form\ModalForm::getDataDialogOptions()

Helper method so we can have consistent dialog options.

Return value

string[] An array of jQuery UI elements to pass on to our dialog form.

2 calls to ModalForm::getDataDialogOptions()
ModalForm::ajaxSubmitForm in form_api_example/src/Form/ModalForm.php
Implements the submit handler for the modal dialog AJAX call.
ModalForm::buildForm in form_api_example/src/Form/ModalForm.php
Form constructor.

File

form_api_example/src/Form/ModalForm.php, line 51

Class

ModalForm
Implements the ModalForm form controller.

Namespace

Drupal\form_api_example\Form

Code

protected static function getDataDialogOptions() {
  return [
    'width' => '50%',
  ];
}