Add ProjectApiFormatter

This commit is contained in:
Frederic Guillot
2017-05-22 16:12:23 -04:00
parent 3c79d11e02
commit 435e053f12
2 changed files with 27 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ namespace Kanboard\Plugin\Calendar;
use Kanboard\Core\Plugin\Base;
use Kanboard\Core\Translator;
use Kanboard\Plugin\Calendar\Formatter\ProjectApiFormatter;
use Kanboard\Plugin\Calendar\Formatter\TaskCalendarFormatter;
class Plugin extends Base
@@ -16,6 +17,10 @@ class Plugin extends Base
return new TaskCalendarFormatter($c);
});
$this->container['projectApiFormatter'] = $this->container->factory(function ($c) {
return new ProjectApiFormatter($c);
});
$this->template->hook->attach('template:dashboard:page-header:menu', 'Calendar:dashboard/menu');
$this->template->hook->attach('template:project:dropdown', 'Calendar:project/dropdown');
$this->template->hook->attach('template:project-header:view-switcher', 'Calendar:project_header/views');