lang() public method

Language form
public lang ( array $config ) : void
$config array Configuration
return void
示例#1
0
 /**
  * Select language in first page
  *
  * @return array
  */
 public function indexAction()
 {
     $this->checkInstall(1);
     $this->installForm->lang($this->getServiceLocator()->get('Config'));
     if ($this->getRequest()->isPost()) {
         $postData = $this->getRequest()->getPost()->toArray();
         $this->installForm->setData($postData);
         if ($this->installForm->isValid()) {
             $session = $this->getSession();
             $session['install'] = array('lang' => $this->installForm->getInputFilter()->getValue('lang'));
             return $this->redirect()->toRoute('install/license');
         }
     }
     $this->layout()->setVariables(array('currentRoute' => $this->getRouteMatch()->getMatchedRouteName()));
     return array('form' => $this->installForm);
 }
示例#2
0
 /**
  * Test
  *
  * @return void
  */
 public function testLang()
 {
     $this->assertNull($this->object->lang(Registry::get('Application')->getConfig()));
 }