public static function AjaxFormTrait::getAjaxAttributes in Context 8.4
Same name and namespace in other branches
- 8 src/Form/AjaxFormTrait.php \Drupal\context\Form\AjaxFormTrait::getAjaxAttributes()
- 8.0 src/Form/AjaxFormTrait.php \Drupal\context\Form\AjaxFormTrait::getAjaxAttributes()
Gets attributes for use with an AJAX modal.
Return value
array Array with the ajax modal attributes.
3 calls to AjaxFormTrait::getAjaxAttributes()
- AjaxFormTrait::getAjaxButtonAttributes in src/
Form/ AjaxFormTrait.php - Gets attributes for use with an add button AJAX modal.
- Blocks::buildConfigurationForm in src/
Plugin/ ContextReaction/ Blocks.php - Form constructor.
- ContextListBuilder::buildForm in modules/
context_ui/ src/ ContextListBuilder.php - Form constructor.
File
- src/
Form/ AjaxFormTrait.php, line 21
Class
- AjaxFormTrait
- Provides helper methods for using an AJAX modal.
Namespace
Drupal\context\FormCode
public static function getAjaxAttributes() {
return [
'class' => [
'use-ajax',
],
'data-dialog-type' => 'modal',
'data-dialog-options' => Json::encode([
'width' => 1000,
]),
];
}