Exemple #1
0
 /**
  * show main login (index) page
  * @param \Base $f3
  */
 public function init(\Base $f3)
 {
     // page title
     $f3->set('pageTitle', 'Pathfinder');
     // main page content
     $f3->set('pageContent', $f3->get('PATHFINDER.VIEW.LOGIN'));
     // body element class
     $f3->set('bodyClass', 'pf-body pf-landing');
     // JS main file
     $f3->set('jsView', 'login');
     // characters  from cookies
     $f3->set('cookieCharacters', $this->getCookieByName(self::COOKIE_PREFIX_CHARACTER, true));
     $f3->set('getCharacterGrid', function ($characters) {
         return 12 / count($characters) <= 3 ? 3 : 12 / count($characters);
     });
 }
Exemple #2
0
 /**
  * get required MySQL variable value
  * @param $key
  * @return string|null
  */
 static function getRequiredMySqlVariables($key)
 {
     $f3 = \Base::instance();
     $requiredMySqlVarKey = 'REQUIREMENTS[MYSQL][VARS][' . $key . ']';
     $data = null;
     if ($f3->exists($requiredMySqlVarKey)) {
         $data = $f3->get($requiredMySqlVarKey);
     }
     return $data;
 }
Exemple #3
0
 /**
  * get environment specific configuration data
  * @param $key
  * @return mixed|null
  */
 static function getEnvironmentData($key)
 {
     $f3 = \Base::instance();
     $environment = $f3->get('PATHFINDER.ENVIRONMENT.SERVER');
     $environmentKey = 'PATHFINDER.ENVIRONMENT[' . $environment . '][' . $key . ']';
     $data = null;
     if ($f3->exists($environmentKey)) {
         $data = $f3->get($environmentKey);
     }
     return $data;
 }
Exemple #4
0
 public function __construct()
 {
     parent::__construct();
     $this->goods = MGoods::app();
     $this->tags = MTags::app();
 }
Exemple #5
0
 /**
  * give the module control about the view
  */
 public function afterroute()
 {
     $this->module->afterroute();
 }
 static function getCrestEndpoint()
 {
     return \Base::instance()->get('PATHFINDER.API.CCP_CREST');
 }
Exemple #7
0
 /**
  * init
  */
 public function init()
 {
     parent::init();
     $this->disableView();
 }
Exemple #8
0
 /**
  * clear all cached files
  * @param \Base $f3
  */
 protected function clearCache(\Base $f3)
 {
     $f3->clear('CACHE');
 }