/**
  * Modules method
  *
  * @return void
  */
 public function modules()
 {
     $this->prepareView('modules.phtml', array('assets' => $this->project->getAssets(), 'acl' => $this->project->getService('acl'), 'phireNav' => $this->project->getService('phireNav')));
     $ext = new Model\Extension(array('acl' => $this->project->getService('acl')));
     $ext->getModules($this->project);
     if (null === $this->request->getPath(1)) {
         $this->view->set('title', $this->view->i18n->__('Extensions') . ' ' . $this->view->separator . ' ' . $this->view->i18n->__('Modules'));
         $this->view->merge($ext->getData());
         $this->send();
     } else {
         if (null !== $this->request->getPath(1) && $this->request->getPath(1) == 'install' && count($ext->new) > 0) {
             $ext->installModules();
             if (null !== $ext->error) {
                 $this->view->set('title', $this->view->i18n->__('Extensions') . ' ' . $this->view->separator . ' ' . $this->view->i18n->__('Modules') . ' ' . $this->view->separator . ' ' . $this->view->i18n->__('Installation Error'));
                 $this->view->merge($ext->getData());
                 $this->send();
             } else {
                 Response::redirect($this->request->getBasePath() . '/modules?saved=' . time());
             }
         } else {
             if ($this->request->isPost() && null !== $this->request->getPath(1) && $this->request->getPath(1) == 'process') {
                 $ext->processModules($this->request->getPost());
                 Response::redirect($this->request->getBasePath() . '/modules?saved=' . time());
             } else {
                 Response::redirect($this->request->getBasePath() . '/modules');
             }
         }
     }
 }