public function getPage()
 {
     if (!is_a($this->page, 'Page')) {
         $this->page = KLib\instance::of('Page', $this->pageId);
     }
     return $this->page;
 }
Exemple #2
0
 public function pre()
 {
     $this->user = Authenticate::session();
     if (!is_a($this->user, 'Kadmin')) {
         throw new Exception('Not Authorized', 401);
     }
     if (MongoId::isValid($this->param2)) {
         $this->page = KLib\instance::of('Page', $this->param2);
     }
 }
Exemple #3
0
 public function getLanguageParent()
 {
     if (!is_a($this->languageParent, 'Menu') && MongoId::isValid($this->languageParentId)) {
         $this->languageParent = KLib\instance::of('Menu', $this->languageParentId);
     }
     return $this->languageParent;
 }