4 * Copyright (C) 2018 Amiel Elboim <amielel@matrix.co.il>
6 * LICENSE: This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @author Amiel Elboim <amielel@matrix.co.il>
19 * @link http://www.open-emr.org
22 namespace PrescriptionTemplates
;
24 use Laminas\ModuleManager\ModuleManager
;
27 * The default module configurator
29 * @author suleymanmelikoglu
34 * the implementation of the autoloader provider,
35 * returns an array for the AutoloaderFactory
37 public function getAutoloaderConfig()
40 'Laminas\Loader\ClassMapAutoloader' => array(
41 __DIR__
. '/autoload_classmap.php',
43 'Laminas\Loader\StandardAutoloader' => array(
44 'namespaces' => array(
45 __NAMESPACE__
=> __DIR__
. '/src/' . __NAMESPACE__
,
52 public function getConfig()
54 return include __DIR__
. '/config/module.config.php';
58 * load global variables foe every controllers
59 * @param ModuleManager $manager
61 public function init(ModuleManager
$manager)
63 $events = $manager->getEventManager();
64 $sharedEvents = $events->getSharedManager();
66 $sharedEvents->attach(__NAMESPACE__
, 'dispatch', function ($e) {
67 $controller = $e->getTarget();
68 //$controller->layout()->setVariable('status', null);
69 $controller->layout('PrescriptionTemplate/layout/layout');