]> BookStack Code Mirror - bookstack/blob - app/Theming/ThemeEvents.php
Started backend theme system
[bookstack] / app / Theming / ThemeEvents.php
1 <?php namespace BookStack\Theming;
2
3 /**
4  * The ThemeEvents used within BookStack.
5  *
6  * This file details the events that BookStack may fire via the custom
7  * theme system, including event names, parameters and expected return types.
8  *
9  * This system is regarded as semi-stable.
10  * We'll look to fix issues with it or migrate old event types but
11  * events and their signatures may change in new versions of BookStack.
12  * We'd advise testing any usage of these events upon upgrade.
13  */
14 class ThemeEvents
15 {
16     /**
17      * Application boot-up.
18      * After main services are registered.
19      * @param \BookStack\Application $app
20      */
21     const APP_BOOT = 'app_boot';
22
23     /**
24      * Commonmark environment configure.
25      * Provides the commonmark library environment for customization
26      * before its used to render markdown content.
27      * If the listener returns a non-null value, that will be used as an environment instead.
28      * @param \League\CommonMark\ConfigurableEnvironmentInterface $environment
29      * @returns \League\CommonMark\ConfigurableEnvironmentInterface|null
30      */
31     const COMMONMARK_ENVIRONMENT_CONFIGURE = 'commonmark_environment_configure';
32 }