Same name in other branches
  1. 4.x src/Form/QuickTabsInstanceEditForm.php \Drupal\quicktabs\Form\QuickTabsInstanceEditForm::getConfigurationDataForm()

Returns configuration data form.

1 call to QuickTabsInstanceEditForm::getConfigurationDataForm()
QuickTabsInstanceEditForm::form in src/Form/QuickTabsInstanceEditForm.php

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;
}