function AjaxFormTrait::getAjaxButtonAttributes

Same name and namespace in other branches
  1. 4.0.x src/Form/AjaxFormTrait.php \Drupal\ctools\Form\AjaxFormTrait::getAjaxButtonAttributes()

Gets attributes for use with an add button AJAX modal.

Return value

array The array of attributes.

File

src/Form/AjaxFormTrait.php, line 35

Class

AjaxFormTrait
Provides helper methods for using an AJAX modal.

Namespace

Drupal\ctools\Form

Code

public static function getAjaxButtonAttributes() {
    return NestedArray::mergeDeep(static::getAjaxAttributes(), [
        'class' => [
            'button',
            'button--small',
            'button-action',
        ],
    ]);
}