• Services

Core controllers and hooks

As we have seen earlier, we provide a way for modules to extend other modules by executing certain code at specific points, which we refer to as 'hooks'. There are also a number of hooks in place in Includable's core, which allow modules to extend or change the display of core views of Includable.

This document provides an overview of such hooks.

General

Hook name Description
site-header Executed just before the end of the <head> tag on all pages on a community. Note that this hook also fires on login pages or public pages, so make sure to check the value of $this->user->anonymous before doing anything with the User object.
site-footer Executed just before the end of the <body> tag on all pages on a community. Note that this hook also fires on login pages or public pages, so make sure to check the value of $this->user->anonymous before doing anything with the User object.

Authentication

Hook name Description
login-header Executed at the top of the login page HTML, right after <div class="login-overlay"></div>.
login-hero If there is a hook available that implements this, the resulting code replaces the logo and site title on the login page.
login-footer Executed after the login page HTML, but before the end of the body.
auth-header Executed before the template HTML of all authentication-related pages, including login, forgot password, finish signup, etc.
auth-footer Executed after the template HTML of all authentication-related pages, including login, forgot password, finish signup, etc.

Manager

Hook name Description
manager Adds a page to the manager navigation bar. Can optionally be used in combination with managerLinks in module.json, which should be an object with the relative paths of each link as key, and their titles as values.
manager-user Adds a tab to the user details. The selected user is available via $this->subject.
manager-dashboard-before Executed before the content on the Manager dashboard page.
manager-dashboard-after Executed after the content on the Manager dashboard page.
manager-dashboard-content If there is a hook available that implements this, default content on the Manager dashboard page is hidden and replaced with the output of this hook.
manager-account-before Executed before the content on the Manager account page.
manager-account-after Executed after the content on the Manager account page.
manager-design-before Executed before the content on the Manager design page.
manager-design-after Executed after the content on the Manager design page.
manager-design-navigation Replaces the navigation section of the Manager design page.
manager-design-login Replaces the login section of the Manager design page.