public function LinkForm::form in Colossal Menu 2.x
Same name and namespace in other branches
- 8 src/Form/LinkForm.php \Drupal\colossal_menu\Form\LinkForm::form()
Gets the actual form array to be built.
Overrides ContentEntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
Form/ LinkForm.php, line 55
Class
- LinkForm
- Form controller for Link edit forms.
Namespace
Drupal\colossal_menu\FormCode
public function form(array $form, FormStateInterface $form_state) {
$link = $this->entity;
if ($this->operation == 'edit') {
$form['#title'] = $this
->t('Edit %label', [
'%label' => $link
->label(),
]);
}
return parent::form($form, $form_state, $link);
}