diff options
author | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2019-12-10 11:34:53 +0100 |
---|---|---|
committer | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2019-12-10 11:34:53 +0100 |
commit | b8fa0246803dab40cf57d40b45984c53046f2d55 (patch) | |
tree | dc92b167c7542137c385614a1d558e57669a4339 /plugins/Calendar/Formatter/ProjectApiFormatter.php | |
parent | 2a43146236fd8fb16f84398d85720ad84aa0a0b1 (diff) |
Plugins directory and local modifications
Diffstat (limited to 'plugins/Calendar/Formatter/ProjectApiFormatter.php')
-rw-r--r-- | plugins/Calendar/Formatter/ProjectApiFormatter.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/Calendar/Formatter/ProjectApiFormatter.php b/plugins/Calendar/Formatter/ProjectApiFormatter.php new file mode 100644 index 00000000..5520801c --- /dev/null +++ b/plugins/Calendar/Formatter/ProjectApiFormatter.php @@ -0,0 +1,22 @@ +<?php + +namespace Kanboard\Plugin\Calendar\Formatter; + +/** + * Class ProjectApiFormatter + * + * @package Kanboard\Plugin\Calendar\Formatter + */ +class ProjectApiFormatter extends \Kanboard\Formatter\ProjectApiFormatter +{ + public function format() + { + $project = parent::format(); + + if (! empty($project)) { + $project['url']['calendar'] = $this->helper->url->to('CalendarController', 'project', array('project_id' => $project['id'], 'plugin' => 'Calendar'), '', true); + } + + return $project; + } +} |