Example #1
0
 /**
  * loadRouting
  *
  * @return  mixed
  */
 public static function loadRouting()
 {
     $app = Ioc::getApplication();
     if ($app->get('client') == 'admin' || $app->get('client') == 'site') {
         return parent::loadRouting();
     }
     return [];
 }
 /**
  * onAfterExecute
  *
  * @param Event $event
  *
  * @return  void
  * 
  * @throws \Windwalker\Filesystem\Exception\FilesystemException
  */
 public function onAfterExecute(Event $event)
 {
     /** @var WebApplication $app */
     $app = Ioc::getApplication();
     // Un comment this line, Translator will export all orphans to /cache/language
     if ($app->get('language.debug')) {
         TranslatorHelper::dumpOrphans('ini');
     }
 }
Example #3
0
 /**
  * Execute the controller.
  *
  * @return  mixed Return executed result.
  *
  * @throws  \LogicException
  * @throws  \RuntimeException
  */
 public function execute()
 {
     if (UserHelper::isLogin()) {
         Ioc::getApplication()->redirect(Router::build('admin:dashboard'));
     }
     $model = new RegistrationModel();
     $view = new RegistrationHtmlView();
     $session = Ioc::getSession();
     $view['item'] = $session['register.form.data'] ?: array();
     $view['item'] = new Data($view['item']);
     return $view->render();
 }