From f268833981f6dc969377fe441535cbad42d16615 Mon Sep 17 00:00:00 2001 From: Paul Dragoonis Date: Sun, 19 Oct 2014 02:23:07 +0100 Subject: [PATCH] adding blogmodule --- app/config/base/app.php | 1 + utils/skeleton_module/Controller/Shared.php | 1 - utils/skeleton_module/Module.php | 42 +++++++++---------- .../resources/config/routes.yml | 4 +- .../resources/views/index/index.html.php | 7 ++-- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/app/config/base/app.php b/app/config/base/app.php index 4f78b8b..b4abe93 100644 --- a/app/config/base/app.php +++ b/app/config/base/app.php @@ -6,6 +6,7 @@ 'Framework', 'Application', 'UserModule', + 'BlogModule', 'PPI\ComposerModule' ), 'module_listener_options' => array( diff --git a/utils/skeleton_module/Controller/Shared.php b/utils/skeleton_module/Controller/Shared.php index 254ceb5..297fd16 100755 --- a/utils/skeleton_module/Controller/Shared.php +++ b/utils/skeleton_module/Controller/Shared.php @@ -6,5 +6,4 @@ class Shared extends BaseController { - } \ No newline at end of file diff --git a/utils/skeleton_module/Module.php b/utils/skeleton_module/Module.php index 4a8e35d..ccd4d62 100755 --- a/utils/skeleton_module/Module.php +++ b/utils/skeleton_module/Module.php @@ -1,18 +1,22 @@ loadYamlRoutes(__DIR__ . '/resources/config/routes.yml'); } - + /** * Get the configuration for this module * @@ -20,24 +24,18 @@ public function init($e) */ public function getConfig() { - return include(__DIR__ . '/resources/config/config.php'); + return $this->loadConfig(__DIR__ . '/resources/config/config.php'); } - /** - * Get the routes for this module - * - * @return \Symfony\Component\Routing\RouteCollection - */ - public function getRoutes() + public function getAutoloaderConfig() { - return $this->loadYamlRoutes(__DIR__ . '/resources/config/routes.yml'); + return array( + 'Zend\Loader\StandardAutoloader' => array( + 'namespaces' => array( + __NAMESPACE__ => __DIR__ . '/src/', + ), + ), + ); } - -// public function getServiceConfig() -// { -// return array('factories' => array( -// -// )); -// } } diff --git a/utils/skeleton_module/resources/config/routes.yml b/utils/skeleton_module/resources/config/routes.yml index 430888b..f057bc0 100755 --- a/utils/skeleton_module/resources/config/routes.yml +++ b/utils/skeleton_module/resources/config/routes.yml @@ -1,3 +1,3 @@ -[MODULE_NAME]_home: - pattern: /[MODULE_NAME]/home +[MODULE_NAME]_Index: + pattern: /[MODULE_NAME]/index defaults: { _controller: "[MODULE_NAME]:Index:index"} \ No newline at end of file diff --git a/utils/skeleton_module/resources/views/index/index.html.php b/utils/skeleton_module/resources/views/index/index.html.php index 8c083ef..61949d6 100755 --- a/utils/skeleton_module/resources/views/index/index.html.php +++ b/utils/skeleton_module/resources/views/index/index.html.php @@ -5,9 +5,10 @@

Don't forget to check out some relevant documentation you can do with your module

\ No newline at end of file