/** * 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); }); }
/** * 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; }
/** * 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; }
public function __construct() { parent::__construct(); $this->goods = MGoods::app(); $this->tags = MTags::app(); }
/** * give the module control about the view */ public function afterroute() { $this->module->afterroute(); }
static function getCrestEndpoint() { return \Base::instance()->get('PATHFINDER.API.CCP_CREST'); }
/** * init */ public function init() { parent::init(); $this->disableView(); }
/** * clear all cached files * @param \Base $f3 */ protected function clearCache(\Base $f3) { $f3->clear('CACHE'); }