123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php namespace Kanboard\Plugin\OMIProjectBranding;
- use Kanboard\Core\Plugin\Base;
- use Kanboard\Core\Translator;
- use Kanboard\Plugin\OMIProjectBranding\Listener\ColorListExtender;
- /**
- * Plugin Initialisation
- *
- * @package Kanboard\Plugin\OMIProjectBranding
- * @author Dwayne @ OMI NZ
- */
- class Plugin extends Base {
- public function initialize() {
- $this->container["helper"]->register("projectBrandingHelper", "\Kanboard\Plugin\OMIProjectBranding\Helper\ProjectBrandingHelper");
- $this->hook->on("template:project:sidebar", ["template" => "OMIProjectBranding:project/sidebar"]);
- $this->route->addRoute("project/:project_id/branding", "ProjectBrandingController", "show", "OMIProjectBranding");
- $this->template->setTemplateOverride("header", "OMIProjectBranding:header");
- $this->container["colorModel"] = $this->container->factory(function ($c) {
- return new \Kanboard\Plugin\OMIProjectBranding\Model\CustomColorModel($c);
- });
- }
-
- public function getClasses() {
- return [
- "Plugin\OMIProjectBranding\Controller" => [
- "ProjectBrandingController",
- ],
- "Plugin\OMIProjectBranding\Model" => [
- "ProjectBrandingModel",
- "CustomColorModel",
- ],
- "Plugin\OMIProjectBranding\Helper" => [
- "ProjectBrandingHelper",
- ],
- ];
- }
-
- public function getPluginName() {
- return "OMI Project Branding";
- }
-
- public function getPluginDescription() {
- return t("Project Branding plugin for Kanboard, to allow a custom logo and some brand colours per project.");
- }
-
- public function getPluginAuthor() {
- return "OMI NZ";
- }
-
- public function getPluginVersion() {
- return "1.0.5";
- }
-
- public function getPluginHomepage() {
- return "https://vcs.nz/ominz/OMIProjectBranding";
- }
- }
- #-
- #plugins/OMIProjectBranding/Plugin.php
|