Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function before()
 {
     $this->view->data->title = tr('Control panel');
     $this->view->data->schemas = $this->findSchemas();
     $this->view->data->models = $this->findModels();
     $this->view->data->controllers = $this->findControllers();
     $this->view->data->snippets = $this->findSnippets();
     return parent::before();
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function before()
 {
     $this->view->data->title = tr('System Info');
     $this->view->data->app = $this->app->manifest;
     $this->view->data->entryScript = realpath($this->app->entryScript);
     $this->view->data->userDir = realpath($this->p('user', ''));
     $this->view->data->appDir = realpath($this->p('app', ''));
     $this->view->data->environment = $this->app->environment;
     $this->view->data->shareDir = realpath($this->p('share', ''));
     return parent::before();
 }
Пример #3
0
 /**
  * {@inheritdoc}
  */
 public function before()
 {
     $this->view->data->title = tr('I18n');
     if (isset($this->m->Extensions)) {
         $this->viewData['extensions'] = $this->m->Extensions->listAllExtensions();
     } else {
         $this->viewData['extensions'] = null;
     }
     if (isset($this->m->Themes)) {
         $this->viewData['themes'] = $this->m->Themes->listAllThemes();
     } else {
         $this->viewData['themes'] = null;
     }
     $this->viewData['dir'] = $this->p('app/languages');
     $this->viewData['project'] = $this->app->name . ' ' . $this->app->version;
     $this->rootDir = $this->p('app');
     if (isset($this->request->query['scope'])) {
         $scope = $this->request->query['scope'];
         if ($scope === 'lib') {
             $this->scope = 'lib';
             $this->viewData['dir'] = $this->p('Core/languages');
             $this->viewData['project'] = 'Jivoo ' . \Jivoo\VERSION;
             $this->rootDir = \Jivoo\PATH;
         } else {
             if (strpos($scope, '-') !== false) {
                 $scope = explode('-', $scope);
                 if (isset($this->m->Extensions) and $scope[0] === 'extension') {
                     if (isset($this->viewData['extensions'][$scope[1]])) {
                         $this->scope = 'extension';
                         $this->extension = $this->viewData['extensions'][$scope[1]];
                         $this->viewData['dir'] = $this->extension->p($this->app, 'languages');
                         $this->viewData['project'] = $this->extension->name . ' ' . $this->extension->version;
                         $this->rootDir = $this->extension->p($this->app, '');
                     }
                 } else {
                     if (isset($this->m->Themes) and $scope[0] === 'theme') {
                         if (isset($this->viewData['themes'][$scope[1]])) {
                             $this->scope = 'theme';
                             $this->theme = $this->viewData['themes'][$scope[1]];
                             $this->viewData['dir'] = $this->theme->p($this->app, 'languages');
                             $this->viewData['project'] = $this->theme->name . ' ' . $this->theme->version;
                             $this->rootDir = $this->theme->p($this->app, '');
                         }
                     }
                 }
             }
         }
     }
     $this->viewData['dirExists'] = Utilities::dirExists($this->viewData['dir']);
     if ($this->viewData['dirExists']) {
         $this->viewData['languages'] = $this->findLanguages($this->viewData['dir']);
     }
     return parent::before();
 }
Пример #4
0
 /**
  * {@inheritdoc}
  */
 public function before()
 {
     $this->view->data->title = tr('Generators');
     return parent::before();
 }