Example #1
0
 public function render($args = NULL)
 {
     parent::render($args);
     $this->template->articles = $this->articles->order('created DESC')->limit($this->count);
     $f = $this->template->getFile();
     if (!isset($f)) {
         $this->template->setFile(__DIR__ . "/Competitions.latte");
     }
     $this->template->headline = $this->headline;
     $this->template->render();
 }
Example #2
0
 /**
  * @param null $args
  */
 public function render($args = NULL)
 {
     parent::render($args);
     // TODO: Change the autogenerated stub
     $articles = $this->articles->where('published < NOW()')->order('created DESC')->limit(10)->fetchPairs('created');
     $venues = $this->venues->fetchVisible()->order('created DESC')->limit(10)->fetchPairs('created');
     $competitions = $this->competitions->order('created DESC')->limit(10)->fetchPairs('created');
     $output = $articles + $venues + $competitions;
     krsort($output);
     $this->template->items = $output;
     $this->template->setFile(__DIR__ . "/StreamControl.basic.latte");
     $this->template->render();
 }