Skip to content

Instantly share code, notes, and snippets.

messyOne

Block or report user

Report or block messyOne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Module.php
public function onModuleDispatch(\Zend\Mvc\MvcEvent $e)
{
//Set the main menu into the layout view model
$serviceManager = $e->getApplication()->getServiceManager();
$navbarContainer = $serviceManager->get('loo_navigation');
$viewModel = $e->getViewModel();
$viewModel->setVariable('navbar', $navbarContainer);
}
View Module.php
public function getViewHelperConfig()
{
return array(
'initializers' => array(
function($instance, $viewServiceManager) {
if ($instance instanceof ServiceLocatorAwareInterface) {
$instance->setServiceLocator($viewServiceManager->getServiceLocator());
}
@messyOne
messyOne / Module.php
Created Oct 10, 2012
Insert user_id in user_role_linker
View Module.php
public function onBootstrap($e)
{
$app = $e->getTarget();
$sm = $app->getServiceManager();
$adapter = $sm->get('Zend\Db\Adapter\Adapter');
// adding action for user registration
$zfcServiceEvents = $sm->get('zfcuser_user_service')->getEventManager();
$zfcServiceEvents->attach(
@messyOne
messyOne / Module.php
Created Oct 9, 2012
ZfcUserMod for DluTwBootstrap
View Module.php
<?php
namespace ZfcUserMod;
/**
* Description of Module
*
* @author messy
*/
class Module
{
You can’t perform that action at this time.