function BookManager::addFormElements
Same name in this branch
- 10 core/modules/book/src/BookManager.php \Drupal\book\BookManager::addFormElements()
Same name and namespace in other branches
- 9 core/modules/book/src/BookManager.php \Drupal\book\BookManager::addFormElements()
- 8.9.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::addFormElements()
- 11.x core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::addFormElements()
- 11.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::addFormElements()
Builds the common elements of the book form for the node and outline forms.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
\Drupal\node\NodeInterface $node: The node whose form is being viewed.
\Drupal\Core\Session\AccountInterface $account: The account viewing the form.
bool $collapsed: If TRUE, the fieldset starts out collapsed.
Return value
array The form structure, with the book elements added.
Overrides BookManagerInterface::addFormElements
File
-
core/
modules/ book/ src/ ProxyClass/ BookManager.php, line 97
Class
- BookManager
- Provides a proxy class for \Drupal\book\BookManager.
Namespace
Drupal\book\ProxyClassCode
public function addFormElements(array $form, \Drupal\Core\Form\FormStateInterface $form_state, \Drupal\node\NodeInterface $node, \Drupal\Core\Session\AccountInterface $account, $collapsed = true) {
return $this->lazyLoadItself()
->addFormElements($form, $form_state, $node, $account, $collapsed);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.