From 851fca0b6496498b0c105023c3b2d6e0ccd02f67 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 18 Dec 2013 16:01:24 +0200 Subject: [PATCH 1/4] match also with classname --- Module.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Module.php b/Module.php index 019a842..03b3039 100644 --- a/Module.php +++ b/Module.php @@ -8,8 +8,12 @@ public function onBootstrap($e) $e->getApplication()->getEventManager()->getSharedManager()->attach('Zend\Mvc\Controller\AbstractController', 'dispatch', function($e) { $controller = $e->getTarget(); $controllerClass = get_class($controller); - $moduleNamespace = substr($controllerClass, 0, strpos($controllerClass, '\\')); $config = $e->getApplication()->getServiceManager()->get('config'); + if (isset($config['module_layouts'][$controllerClass])) { + $controller->layout($config['module_layouts'][$controllerClass]); + return; + } + $moduleNamespace = substr($controllerClass, 0, strpos($controllerClass, '\\')); if (isset($config['module_layouts'][$moduleNamespace])) { $controller->layout($config['module_layouts'][$moduleNamespace]); } From d96a3d237016d4e51064e56fd1a74e72cea97aab Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 Dec 2013 12:54:38 +0200 Subject: [PATCH 2/4] composer info --- composer.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index 157289b..03fdcf3 100644 --- a/composer.json +++ b/composer.json @@ -1,24 +1,24 @@ { - "name": "evandotpro/edp-module-layouts", - "description": "EdpModuleLayouts is very simple ZF2 module for making module-specific layouts insanely easy.", - "type": "library", - "keywords": [ - "zf2" - ], - "homepage": "https://github.com/EvanDotPro/EdpModuleLayouts", - "authors": [ - { - "name": "Evan Coury", - "email": "me@evancoury.com", - "homepage": "http://blog.evan.pro/" - } - ], - "require": { - "php": ">=5.3" + "name" : "ixtec/edp-module-layouts", + "description" : "EdpModuleLayouts is very simple ZF2 module for making module-specific layouts insanely easy.", + "require" : { + "php" : ">=5.3" }, - "autoload": { - "classmap": [ - "./Module.php" - ] - } -} + "authors" : [ + { + "name" : "Evan Coury", + "email" : "me@evancoury.com", + "homepage" : "http://blog.evan.pro/" + }, { + "name" : "Oliver Konig", + "email" : "ixtec.io@gmail.com", + "homepage" : "http://ixtec.io/" + } + ], + "keywords" : [ "zf2" ], + "autoload" : { + "classmap" : [ "./Module.php" ] + }, + "type" : "library", + "homepage" : "https://github.com/ixtec/EdpModuleLayouts" +} \ No newline at end of file From c5995c1662dfd3b2c580dcc2c0c4522492691878 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 Dec 2013 12:58:20 +0200 Subject: [PATCH 3/4] format --- composer.json | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/composer.json b/composer.json index 03fdcf3..4cb1a5d 100644 --- a/composer.json +++ b/composer.json @@ -1,24 +1,22 @@ { - "name" : "ixtec/edp-module-layouts", + "name" : "ixtec/EdpModuleLayouts", "description" : "EdpModuleLayouts is very simple ZF2 module for making module-specific layouts insanely easy.", "require" : { "php" : ">=5.3" }, - "authors" : [ - { - "name" : "Evan Coury", - "email" : "me@evancoury.com", - "homepage" : "http://blog.evan.pro/" - }, { - "name" : "Oliver Konig", - "email" : "ixtec.io@gmail.com", - "homepage" : "http://ixtec.io/" - } - ], - "keywords" : [ "zf2" ], - "autoload" : { - "classmap" : [ "./Module.php" ] - }, - "type" : "library", - "homepage" : "https://github.com/ixtec/EdpModuleLayouts" + "authors" : [{ + "name" : "Evan Coury", + "email" : "me@evancoury.com", + "homepage" : "http://blog.evan.pro/" + }, { + "name" : "Oliver Konig", + "email" : "ixtec.io@gmail.com", + "homepage" : "http://ixtec.io/" + }], + "keywords" : [ "zf2" ], + "autoload" : { + "classmap" : [ "./Module.php" ] + }, + "type" : "library", + "homepage" : "https://github.com/ixtec/EdpModuleLayouts" } \ No newline at end of file From 1caab49799a09b76b0f37c4eab46d0e9e0267302 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 Dec 2013 13:02:25 +0200 Subject: [PATCH 4/4] update --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4cb1a5d..9a30040 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name" : "ixtec/EdpModuleLayouts", + "name" : "ixtec/edp-module-layouts", "description" : "EdpModuleLayouts is very simple ZF2 module for making module-specific layouts insanely easy.", "require" : { "php" : ">=5.3"