Ejemplo n.º 1
0
 public function testHelperEntryPointWithContainerStringParam()
 {
     $pm = new \Zend\View\HelperPluginManager();
     $pm->setServiceLocator($this->serviceManager);
     $this->_helper->setServiceLocator($pm);
     $returned = $this->_helper->__invoke('nav1');
     $this->assertEquals($this->_helper, $returned);
     $this->assertEquals($this->_nav1, $returned->getContainer());
 }
 /**
  *
  * @param \Contentinum\Options\PageOptions $pageOptions            
  * @param Zend\View\HelperPluginManager $viewHelperManager            
  */
 protected function setAppLocale($pageOptions, $viewHelperManager)
 {
     $dateFormat = $viewHelperManager->get('dateFormat');
     $dateFormat->setTimezone($pageOptions->getTimeZone())->setLocale($pageOptions->getLocale());
 }
Ejemplo n.º 3
0
    return true;
}, 'User_AuthController' => function ($sm) {
    $controller = $sm->get('controller');
    $controller->setModel($sm->get('User_Auth'));
    $controller->setForm($sm->get('Login_Form'));
    return true;
}, 'User_RegisterController' => function ($sm) {
    $controller = $sm->get('controller');
    $controller->setModel($sm->get('User_Registration'));
    $controller->setFormRecovery($sm->get('Recovery_Form'));
    $controller->setFormRegistration($sm->get('Registration_Form'));
    return true;
}, 'Login_Form' => function ($sm) {
    $loginForm = new User_Form_Login();
    $loginForm->init();
    return $loginForm;
}, 'Recovery_Form' => function ($sm) {
    $recoveryForm = new User_Form_Recovery();
    $recoveryForm->init();
    return $recoveryForm;
}, 'Registration_Form' => function ($sm) {
    $registrationForm = new User_Form_Registration();
    $registrationForm->init();
    return $registrationForm;
}, 'ViewFormHelperManager' => function ($sm) {
    $manager = new \Zend\View\HelperPluginManager(new \Zend\Form\View\HelperConfig());
    $renderer = new \Zend\View\Renderer\PhpRenderer();
    $manager->setRenderer($renderer);
    $renderer->setHelperPluginManager($manager);
    return $manager;
}), 'invokables' => array('User_Model' => 'User_Model_UserProfile', 'User_Auth' => 'User_Model_UserAuth', 'User_Registration' => 'User_Model_UserRegistration'));