public ContainerForm::form(array $form, FormStateInterface $form_state)
Gets the actual form array to be built.
Overrides ForumForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- core/modules/forum/src/Form/ContainerForm.php, line 22
Class
- ContainerForm
- Base form for container term edit forms.
Namespace
Drupal\forum\Form
Code
public function form(array $form, FormStateInterface $form_state) { $taxonomy_term = $this->entity; // Build the bulk of the form from the parent forum form. $form = parent::form($form, $form_state, $taxonomy_term); // Set the title and description of the name field. $form['name']['#title'] = $this->t('Container name'); $form['name']['#description'] = $this->t('Short but meaningful name for this collection of related forums.'); // Alternate description for the container parent. $form['parent'][0]['#description'] = $this->t('Containers are usually placed at the top (root) level, but may also be placed inside another container or forum.'); $this->forumFormType = $this->t('forum container'); return $form; }
Please login to continue.