book_form_node_confirm_form_alter

book_form_node_confirm_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\Form\NodeDeleteForm. Alters the confirm form for a single node deletion. File core/modules/book/book.module, line 330 Allows users to create and organize related content in an outline. Code function book_form_node_confirm_form_alter(&$form, FormStateInterface $form_state) { // Only need to alter the delete operation form. if ($form_state->getFormO

book_entity_type_build

book_entity_type_build(array &$entity_types) Implements hook_entity_type_build(). File core/modules/book/book.module, line 80 Allows users to create and organize related content in an outline. Code function book_entity_type_build(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['node'] ->setFormClass('book_outline', 'Drupal\book\Form\BookOutlineForm') ->setLinkTemplate('book-outline-form', '/node/{node}/outline')

BookUninstallValidator::__construct

public BookUninstallValidator::__construct(BookOutlineStorageInterface $book_outline_storage, QueryFactory $query_factory, TranslationInterface $string_translation) Constructs a new BookUninstallValidator. Parameters \Drupal\book\BookOutlineStorageInterface $book_outline_storage: The book outline storage. \Drupal\Core\Entity\Query\QueryFactory $query_factory: The entity query factory. \Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service. File

BookUninstallValidator::validate

public BookUninstallValidator::validate($module) Determines the reasons a module can not be uninstalled. Example implementation: public function validate($module) { $entity_types = $this->entityManager->getDefinitions(); $reasons = array(); foreach ($entity_types as $entity_type) { if ($module == $entity_type->getProvider() && $entity_type instanceof ContentEntityTypeInterface && $this->entityManager->getStorage($entity_type->id())->hasData()) {

BookUninstallValidator::hasBookOutlines

protected BookUninstallValidator::hasBookOutlines() Checks if there are any books in an outline. Return value bool TRUE if there are books, FALSE if not. File core/modules/book/src/BookUninstallValidator.php, line 74 Class BookUninstallValidator Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. Namespace Drupal\book Code protected function hasBookOutlines() { return $this->bookOutlineStorage->hasBooks(); }

BookUninstallValidator::hasBookNodes

protected BookUninstallValidator::hasBookNodes() Determines if there is any book nodes or not. Return value bool TRUE if there are book nodes, FALSE otherwise. File core/modules/book/src/BookUninstallValidator.php, line 84 Class BookUninstallValidator Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. Namespace Drupal\book Code protected function hasBookNodes() { $nodes = $this->entityQuery ->condition('type', 'boo

BookUninstallValidator::$entityQuery

The entity query for node. Type: \Drupal\Core\Entity\Query\QueryInterface File core/modules/book/src/BookUninstallValidator.php, line 30 Class BookUninstallValidator Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. Namespace Drupal\book Code protected $entityQuery;

BookUninstallValidator::$bookOutlineStorage

The book outline storage. Type: \Drupal\book\BookOutlineStorageInterface File core/modules/book/src/BookUninstallValidator.php, line 23 Class BookUninstallValidator Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. Namespace Drupal\book Code protected $bookOutlineStorage;

BookUninstallValidator

Prevents book module from being uninstalled whilst any book nodes exist or there are any book outline stored. Hierarchy class \Drupal\book\BookUninstallValidator implements ModuleUninstallValidatorInterface uses StringTranslationTrait File core/modules/book/src/BookUninstallValidator.php, line 14 Namespace Drupal\book Members Name Modifiers Type Description BookUninstallValidator::$bookOutlineStorage protected property The book outline storage. BookUninstallValidator::

BookSettingsForm::validateForm

public BookSettingsForm::validateForm(array &$form, FormStateInterface $form_state) Form validation handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides FormBase::validateForm File core/modules/book/src/Form/BookSettingsForm.php, line 56 Class BookSettingsForm Configure book settings for this site. Namespace Drupal\book\Form Code public function validat