You are here

public function TabEditForm::buildForm in Block Tabs 8

Parameters

\Drupal\blocktabs\BlocktabsInterface $blocktabs: The block tabs.

string $tab: The tab ID.

Return value

array The form structure.

Throws

\Symfony\Component\HttpKernel\Exception\NotFoundHttpException

Overrides TabFormBase::buildForm

File

src/Form/TabEditForm.php, line 16

Class

TabEditForm
Provides an edit form for tab.

Namespace

Drupal\blocktabs\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, BlocktabsInterface $blocktabs = NULL, $tab = NULL) {
  $form = parent::buildForm($form, $form_state, $blocktabs, $tab);
  $form['#title'] = $this
    ->t('Edit %label tab', [
    '%label' => $this->tab
      ->label(),
  ]);
  $form['actions']['submit']['#value'] = $this
    ->t('Update tab');
  return $form;
}