Esempio n. 1
0
 public function feed()
 {
     $tpl = new Util\Template(Util\Template::MODULE, ['app', 'plugin']);
     $items = \Own\App\Standard\Data::loadByVersion();
     $tpl->set('items', $items);
     $tpl->set('url', $this->app->url());
     return $tpl->render('feed');
 }
Esempio n. 2
0
 private function getDetail($title)
 {
     $r = [];
     $item = Data::loadByUrlFriendlyTitle($title);
     if (isset($item)) {
         $tpl = new Util\Template(Util\Template::MODULE, ['app', 'Standard']);
         $tpl->set('item', $item);
         $tpl->set('filter', self::hasFilter());
         $r[] = ResultType::SUCCESS;
         $r[] = $tpl->render('detail');
         return $r;
     }
     $r[] = ResultType::ERROR;
     $r[] = '';
     return $r;
 }