Exemple #1
0
 public function fetch($template, array $params = array())
 {
     $templating = $this->getApp()->getTemplating();
     $templating->addGlobal('app', $this->getApp());
     $templating->addGlobal('headers', DOC::getHeaders());
     return $templating->render($template, $params);
 }
Exemple #2
0
 protected function getMulti($name, $values = null, $items = array())
 {
     DOC::addChosen();
     $ids = array();
     if ($values) {
         foreach ($values as $row) {
             $id = $row->getId();
             $ids[$id] = $id;
         }
     }
     $arr = array();
     foreach ($items as $row) {
         $arr[$row->getId()] = $row;
     }
     $attributes = array('multiple' => true, 'style' => 'width: 100%;');
     return HTML::multi($name, $arr, $ids, $attributes);
 }