function BookRemoveForm::getDescription

Same name and namespace in other branches
  1. 8.9.x core/modules/book/src/Form/BookRemoveForm.php \Drupal\book\Form\BookRemoveForm::getDescription()
  2. 10 core/modules/book/src/Form/BookRemoveForm.php \Drupal\book\Form\BookRemoveForm::getDescription()
  3. 11.x core/modules/book/src/Form/BookRemoveForm.php \Drupal\book\Form\BookRemoveForm::getDescription()

Overrides ConfirmFormBase::getDescription

File

core/modules/book/src/Form/BookRemoveForm.php, line 69

Class

BookRemoveForm
Remove form for book module.

Namespace

Drupal\book\Form

Code

public function getDescription() {
    $title = [
        '%title' => $this->node
            ->label(),
    ];
    if ($this->node->book['has_children']) {
        return $this->t('%title has associated child pages, which will be relocated automatically to maintain their connection to the book. To recreate the hierarchy (as it was before removing this page), %title may be added again using the Outline tab, and each of its former child pages will need to be relocated manually.', $title);
    }
    else {
        return $this->t('%title may be added to hierarchy again using the Outline tab.', $title);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.