public static function AjaxFormTrait::getAjaxAttributes in Chaos Tool Suite (ctools) 8.3
Gets attributes for use with an AJAX modal.
Return value
array
1 call to AjaxFormTrait::getAjaxAttributes()
- AjaxFormTrait::getAjaxButtonAttributes in src/
Form/ AjaxFormTrait.php - Gets attributes for use with an add button AJAX modal.
File
- src/
Form/ AjaxFormTrait.php, line 18
Class
- AjaxFormTrait
- Provides helper methods for using an AJAX modal.
Namespace
Drupal\ctools\FormCode
public static function getAjaxAttributes() {
return [
'class' => [
'use-ajax',
],
'data-dialog-type' => 'modal',
'data-dialog-options' => Json::encode([
'width' => 'auto',
]),
];
}