$this->bookOutlineStorage->
delete($nid);
if ($nid ==
$original['bid'
]) { // Handle deletion of a top-level post.
$result =
$this->bookOutlineStorage->
loadBookChildren($nid);
$children =
$this->entityTypeManager->
getStorage('node'
)->
loadMultiple(array_keys($result));
foreach ($children as $child) { $child->book
['bid'
] =
$child->
id();
$this->
updateOutline($child);
} } $this->
updateOriginalParent($original);
$this->books = NULL;
Cache::
invalidateTags(['bid:' .
$original['bid'
]]);
} /**
* {@inheritdoc}
*/
public function bookTreeAllData($bid,
$link = NULL,
$max_depth = NULL
) { // Use $nid as flag for whether the data being loaded is for the whole tree.
$nid =
$link['nid'
] ?? 0;
$langcode =
$this->languageManager->
getCurrentLanguage(LanguageInterface::TYPE_CONTENT
)->
getId();