You are here

public static function AjaxFormTrait::getAjaxButtonAttributes in Context 8

Same name and namespace in other branches
  1. 8.4 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

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

File

src/Form/AjaxFormTrait.php, line 39
Contains \Drupal\context\Form\AjaxFormTrait.

Class

AjaxFormTrait
Provides helper methods for using an AJAX modal. This is a copy of the ctools AjaxFormTrait.

Namespace

Drupal\context\Form

Code

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