You are here

private function QuickTabsInstanceEditForm::getConfigurationDataForm in Quick Tabs 8.3

Returns configuration data form.

1 call to QuickTabsInstanceEditForm::getConfigurationDataForm()
QuickTabsInstanceEditForm::form in src/Form/QuickTabsInstanceEditForm.php
Gets the actual form array to be built.

File

src/Form/QuickTabsInstanceEditForm.php, line 309

Class

QuickTabsInstanceEditForm
Class QuickTabsInstanceEditForm.

Namespace

Drupal\quicktabs\Form

Code

private function getConfigurationDataForm($qt) {
  $configuration_data = [
    '#type' => 'table',
    '#header' => [
      $this
        ->t('Tab title'),
      $this
        ->t('Tab weight'),
      $this
        ->t('Tab type'),
      $this
        ->t('Tab content'),
      $this
        ->t('Operations'),
    ],
    '#empty' => $this
      ->t('There are no tabs yet'),
    '#tabledrag' => [
      [
        'action' => 'order',
        'relationship' => 'sibling',
        'group' => 'mytable-order-weight',
      ],
    ],
  ];
  foreach ($qt->tabs as $index => $tab) {
    $tab['entity_id'] = $this->entity
      ->id();
    $tab['delta'] = $index;
    $configuration_data[$index] = $this
      ->getRow($index, $tab);
  }
  return $configuration_data;
}