. // }}} namespace Plugin\Cover; use App\Core\Event; use App\Core\Module; use App\Core\Router\RouteLoader; class Cover extends Module { /** * Map URLs to actions * * @param RouteLoader $r * * @return bool hook value; true means continue processing, false means stop. */ public function onAddRoute(RouteLoader $r): bool { $r->connect('settings_cover', 'settings/cover', [Controller\Cover::class, 'cover']); return Event::next; } /** * Populate twig vars * * @param array $vars * * @return bool hook value; true means continue processing, false means stop. */ public function onStartTwigPopulateVars(array &$vars): bool { /* $vars['tabs'] = [['title' => 'Poll', 'href' => 'newpoll', ]]; */ $vars['profile_tabs'] = [['title' => 'Cover', 'href' => 'settings_cover', ]]; return Event::next; } /** * Output our dedicated stylesheet * * @param array $styles stylesheets path * * @return bool hook value; true means continue processing, false means stop. */ public function onStartShowStyles(array &$styles): bool { //$styles[] = 'poll/poll.css'; return Event::next; } }