diff options
author | Frédéric Guillot <fred@kanboard.net> | 2018-04-06 10:54:58 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-04-06 10:54:58 -0700 |
commit | 0b306fa60ad84ea077111e0ff7b59208ba7bc8a3 (patch) | |
tree | 5d8941b5950ede2db8ca3fba0213792db0f07a50 /doc/es_ES/plugin-notifications.markdown | |
parent | ac11220a1aa7ae30b8827d9bbf221888d3edd0a7 (diff) |
Move documentation to https://docs.kanboard.org/
Diffstat (limited to 'doc/es_ES/plugin-notifications.markdown')
-rw-r--r-- | doc/es_ES/plugin-notifications.markdown | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/doc/es_ES/plugin-notifications.markdown b/doc/es_ES/plugin-notifications.markdown deleted file mode 100644 index e014cf63..00000000 --- a/doc/es_ES/plugin-notifications.markdown +++ /dev/null @@ -1,59 +0,0 @@ -Agregar notificaciones con los tipos de plugin -============================================== - -Puede enviar notificaciones a casi cualquier sistema mediante la adición de un nuevo tipo . -There are two kinds of notifications: project and user. - -- Project: Notificaciones configuradas a nivel de proyecto -- Usuario: Notificaciones enviadas individualmente y configurada a cada perfil de usuario. - -Registra un nuevo tipo de notificación --------------------------------------- - -En tu archivo de registro del plugin llama el metodo `setType()`: - -```php -$this->userNotificationTypeModel->setType('irc', t('IRC'), '\Kanboard\Plugin\IRC\Notification\IrcHandler'); -$this->projectNotificationTypeModel->setType('irc', t('IRC'), '\Kanboard\Plugin\IRC\Notification\IrcHandler'); -``` - -Su controlador puede ser registrado por el usuario o la notificación del proyecto. No necesariamente tienen que soportarlo . -Cuando tu handler es registrdo, el usuario final **end-user** puede elegir recibir el nuevo tipo de notificación o no - -Notificación de Handler ------------------------ - -Su controlador de notificación debe implementar la interfaz `Kanboard\Core\Notification\NotificationInterface`: - -```php -interface NotificationInterface -{ - /** - * Envia notificación a un usuario - * - * @access public - * @param array $user - * @param string $event_name - * @param array $event_data - */ - public function notifyUser(array $user, $event_name, array $event_data); - - /** - * Envia notificacion a un projecto - * - * @access public - * @param array $project - * @param string $event_name - * @param array $event_data - */ - public function notifyProject(array $project, $event_name, array $event_data); -} -``` - -Ejemplo de notificacion de plugins ---------------------------------- - -- [Slack](https://github.com/kanboard/plugin-slack) -- [Hipchat](https://github.com/kanboard/plugin-hipchat) -- [Jabber](https://github.com/kanboard/plugin-jabber) - |