You are here

protected function WebformElementBase::buildConfigurationFormTabs in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::buildConfigurationFormTabs()

Build configuration form tabs.

Parameters

array $form: An associative array containing the initial structure of the plugin form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The plugin form with tabs.

1 call to WebformElementBase::buildConfigurationFormTabs()
WebformElementBase::buildConfigurationForm in src/Plugin/WebformElementBase.php
Form constructor.
1 method overrides WebformElementBase::buildConfigurationFormTabs()
WebformElement::buildConfigurationFormTabs in src/Plugin/WebformElement/WebformElement.php
Build configuration form tabs.

File

src/Plugin/WebformElementBase.php, line 3502

Class

WebformElementBase
Provides a base class for a webform element.

Namespace

Drupal\webform\Plugin

Code

protected function buildConfigurationFormTabs(array $form, FormStateInterface $form_state) {
  $tabs = [
    'conditions' => [
      'title' => $this
        ->t('Conditions'),
      'elements' => [
        'conditional_logic',
      ],
      'weight' => 10,
    ],
    'advanced' => [
      'title' => $this
        ->t('Advanced'),
      'elements' => [
        'default',
        'multiple',
        'wrapper_attributes',
        'element_attributes',
        'label_attributes',
        'summary_attributes',
        'title_attributes',
        'display',
        'admin',
        'options_properties',
        'custom',
      ],
      'weight' => 20,
    ],
    'access' => [
      'title' => $this
        ->t('Access'),
      'elements' => [
        'access',
      ],
      'weight' => 30,
    ],
  ];
  return WebformFormHelper::buildTabs($form, $tabs, $form_state
    ->get('active_tab'));
}