Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @param AbstractRequest $request
- * @return void
- */
- public function postDispatch(AbstractRequest $request)
- {
- if ($this->getLayout()->isEnabled()) {
- $currentModule = strtolower($request->getModuleName());
- $path = $this->getLayout()->getLayoutPath() . $currentModule;
- if (is_dir($path)) {
- $this->getLayout()->setViewScriptPath($path);
- $currentLayout = $this->getLayout()->getLayout();
- $layout = $currentModule . DIRECTORY_SEPARATOR . $currentLayout;
- $this->getLayout()->setLayout($layout);
- // choose which navigation container to use
- $navigationContainer = $this->getLocator()->get(ucfirst($currentModule) . 'NavigationContainer');
- $this->getLayout()->getView()->assign('navigationContainer', $navigationContainer);
- }
- }
- }
Add Comment
Please, Sign In to add comment