You are here

public static function AjaxFormTrait::getAjaxButtonAttributes in Context 8.4

Same name and namespace in other branches
  1. 8 src/Form/AjaxFormTrait.php \Drupal\context\Form\AjaxFormTrait::getAjaxButtonAttributes()
  2. 8.0 src/Form/AjaxFormTrait.php \Drupal\context\Form\AjaxFormTrait::getAjaxButtonAttributes()

Gets attributes for use with an add button AJAX modal.

Return value

array Array with the add button AJAX modal attributes.

1 call to AjaxFormTrait::getAjaxButtonAttributes()
Blocks::buildConfigurationForm in src/Plugin/ContextReaction/Blocks.php
Form constructor.

File

src/Form/AjaxFormTrait.php, line 37

Class

AjaxFormTrait
Provides helper methods for using an AJAX modal.

Namespace

Drupal\context\Form

Code

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