diff options
Diffstat (limited to 'doc/plugin-hooks.markdown')
-rw-r--r-- | doc/plugin-hooks.markdown | 81 |
1 files changed, 60 insertions, 21 deletions
diff --git a/doc/plugin-hooks.markdown b/doc/plugin-hooks.markdown index 6e9718d9..c1b3e577 100644 --- a/doc/plugin-hooks.markdown +++ b/doc/plugin-hooks.markdown @@ -58,8 +58,28 @@ class Plugin extends Base } ``` +Example to override default values for task forms: + +```php +class Plugin extends Base +{ + public function initialize() + { + $this->hook->on('controller:task:form:default', function (array $default_values) { + return empty($default_values['score']) ? array('score' => 4) : array(); + }); + } +} +``` + List of merging hooks: +#### controller:task:form:default + +- Override default values for task forms +- Arguments: + - `$default_values`: actual default values (array) + #### controller:calendar:project:events - Add more events to the project calendar @@ -131,26 +151,45 @@ Template names without prefix are core templates. List of template hooks: -- `template:auth:login-form:before` -- `template:auth:login-form:after` -- `template:dashboard:sidebar` -- `template:config:sidebar` -- `template:config:integrations` -- `template:project:integrations` -- `template:user:integrations` -- `template:export:sidebar` -- `template:layout:head` -- `template:layout:top` -- `template:layout:bottom` -- `template:project:dropdown`: "Actions" menu on left in different project views -- `template:project:header:before` -- `template:project:header:after` -- `template:project-user:sidebar` -- `template:task:sidebar:information` -- `template:task:sidebar:actions` -- `template:user:sidebar:information` -- `template:user:sidebar:actions` -- `template:app:filters-helper:before` -- `template:app:filters-helper:after` +| Hook | Description | +|------------------------------------------|----------------------------------------------------| +| `template:analytic:sidebar` | Sidebar on analytic pages | +| `template:app:filters-helper:before` | Filter helper dropdown (top) | +| `template:app:filters-helper:after` | Filter helper dropdown (bottom) | +| `template:auth:login-form:before` | Login page (top) | +| `template:auth:login-form:after` | Login page (bottom) | +| `template:config:sidebar` | Sidebar on settings page | +| `template:config:application ` | Application settings form | +| `template:config:integrations` | Integration page in global settings | +| `template:dashboard:sidebar` | Sidebar on dashboard page | +| `template:export:sidebar` | Sidebar on export pages | +| `template:layout:head` | Page layout `<head/>` tag | +| `template:layout:top` | Page layout top header | +| `template:layout:bottom` | Page layout footer | +| `template:project:dropdown` | "Actions" menu on left in different project views | +| `template:project:header:before` | Project filters (before) | +| `template:project:header:after` | Project filters (after) | +| `template:project:integrations` | Integration page in projects settings | +| `template:project:sidebar` | Sidebar in project settings | +| `template:project-user:sidebar` | Sidebar on project user overview page | +| `template:task:menu` | "Actions" menu on left in different task views | +| `template:task:dropdown` | Task dropdown menu in listing pages | +| `template:task:sidebar` | Sidebar on task page | +| `template:task:form:right-column` | Right column in task form | +| `template:task:show:top ` | Show task page: top | +| `template:task:show:bottom` | Show task page: bottom | +| `template:task:show:before-description` | Show task page: before description | +| `template:task:show:before-tasklinks` | Show task page: before tasklinks | +| `template:task:show:before-subtasks` | Show task page: before subtasks | +| `template:task:show:before-timetracking` | Show task page: before timetracking | +| `template:task:show:before-attachements` | Show task page: before attachments | +| `template:task:show:before-comments` | Show task page: before comments | +| `template:user:authentication:form` | "Edit authentication" form in user profile | +| `template:user:create-remote:form` | "Create remote user" form | +| `template:user:external` | "External authentication" page in user profile | +| `template:user:integrations` | Integration page in user profile | +| `template:user:sidebar:actions` | Sidebar in user profile (section actions) | +| `template:user:sidebar:information` | Sidebar in user profile (section information) | + Another template hooks can be added if necessary, just ask on the issue tracker. |