Same name in other branches
- 8.x-3.x src/Form/QuickTabsInstanceDuplicateForm.php \Drupal\quicktabs\Form\QuickTabsInstanceDuplicateForm::form()
Fichier
-
src/
Form/ QuickTabsInstanceDuplicateForm.php, line 23
Classe
- QuickTabsInstanceDuplicateForm
- Class QuickTabsInstanceDuplicateForm.
Namespace
Drupal\quicktabs\FormCode
public function form(array $form, FormStateInterface $form_state) {
parent::form($form, $form_state);
$form['#title'] = $this->t('Duplicate of @label', [
'@label' => $this->entity
->label(),
]);
$form['label'] = [
'#type' => 'textfield',
'#title' => $this->t('Name'),
'#required' => TRUE,
'#size' => 32,
'#maxlength' => 255,
'#default_value' => $this->t('Duplicate of @label', [
'@label' => $this->entity
->label(),
]),
];
$form['id'] = [
'#type' => 'machine_name',
'#maxlength' => 32,
'#default_value' => '',
'#machine_name' => [
'exists' => 'quicktabs_machine_name_exists',
],
'#description' => $this->t('A unique machine-readable name for this QuickTabs instance. It must only contain lowercase letters, numbers, and underscores. The machine name will be used internally by QuickTabs and will be used in the CSS ID of your QuickTabs block.'),
'#weight' => -8,
];
return $form;
}