/** * Create new Knowledgebase object * * @param User $user */ public function __construct($connection = null, $username = null, $password = null) { parent::__construct($connection, $username, $password); $this->config = Config::getInstance(); $this->searchable_fields = explode(",", $this->config->getConfig("DATABASE_SEARCHABLE_FIELDS", false, "title,description,creator,publisher,alternate_titles,keywords,coverage")); $this->filter = new DatabaseFilter(); }
/** * (non-PHPdoc) * @see Xerxes\Mvc.ActionController::init() */ public function init() { $this->knowledgebase = $this->getKnowledgebase(); // view helper $this->helper = new DatabasehHelper($this->event); // config $this->config = Config::getInstance(); $this->response->setVariable('config_local', $this->config); // local navigation links $this->response->setVariable('edit_link', $this->helper->getEditLink()); // cached data $this->setCachedData(); }
/** * Lazyload Config */ public function config() { if (!$this->config instanceof Config) { $this->config = Config::getInstance(); } return $this->config; }
/** * @return Config */ protected function config() { return Config::getInstance(); }