Ejemplo 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');
 }
Ejemplo n.º 2
0
 public function filteredList($filterId)
 {
     if (isset($_GET['title'])) {
         list($result, $message) = self::getDetail($_GET['title']);
         if ($result == ResultType::SUCCESS) {
             return $message;
         }
     }
     $options = [];
     if ($filterId != 0) {
         $options['where'][] = ['content.filter_id = ?', $filterId];
     }
     $items = Data::loadByVersion('published', true, $options);
     $tpl = new Util\Template(Util\Template::MODULE, ['app', 'Standard']);
     $tpl->set('items', $items);
     $tpl->set('filter', self::hasFilter());
     return $tpl->render('cards');
 }