hook->on('template:config:sidebar', ['template' => 'OMITemplateModder:config/sidebar']); // Register the new route for the plugin configuration page $this->route->addRoute("/settings/template_modder", "TemplateController", "show", "OMITemplateModder"); $this->route->addRoute("/settings/template_modder/edit/:template_index", "TemplateController", "edit", "OMITemplateModder"); $this->route->addRoute("/settings/template_modder/save/:template_index", "TemplateController", "save", "OMITemplateModder"); // loop through all notification templates and registers them (that exist in this plugin dir!) $templateDir = ETM_PLUGIN_ROOT_DIR . "/Template/notification"; foreach (glob($templateDir . "/*.php") as $filename) { $templateName = basename($filename, ".php"); $this->template->setTemplateOverride("notification/" . $templateName, "EmailTemplateModder:notification/" . $templateName); } } public function getPluginName() { return "OMI Notification Template Modder"; } public function getPluginDescription() { return t("View and modify Kanboard notification templates which include email templates. Built by dwayne Pivac @ OMI Ltd."); } public function getPluginAuthor() { return "OMI"; } public function getPluginVersion() { return "1.0.0"; } public function getPluginHomepage() { return "https://vcs.nz/ominz/kb_notification_tpl_modr"; } public function getCompatibleVersion() { return ">=1.2.11"; } } #- #plugins/OMITemplateModder/Plugin.php