Help extension

Provides foundation for help pages that are generated from loaded extensions, starting with comprehensive search documentation. Addresses #522
This commit is contained in:
Matthew Barbour
2019-08-02 15:05:49 -05:00
committed by matthew
parent 00464d2579
commit a18589ee0a
31 changed files with 769 additions and 6 deletions

View File

@@ -93,6 +93,20 @@ class Trash extends Extension
}
}
public function onHelpPageBuilding(HelpPageBuildingEvent $event)
{
global $user;
if($event->key===HelpPages::SEARCH) {
if($user->can(Permissions::VIEW_TRASH)) {
$block = new Block();
$block->header = "Trash";
$block->body = $this->theme->get_help_html();
$event->add_block($block);
}
}
}
private function no_trash_query(array $context): bool
{
foreach ($context as $term) {