Example #1
0
 /**
  * Render a list and add it to the current view
  *
  * @param $listName string with a listname
  * @param $list OntoWiki_Model_Instances a list of resources
  * @param $view the current view to which the list should be added
  * @param $mainTemplate the template to use for rendering the list
  * @param $other array of other values available to the template
  * @param $returnOutput true|false if false, the list is rendered directly to the view else the
  *        rendered list is returned
  * @return the rendered list if $returnOutput is true
  */
 public function addList($listName, OntoWiki_Model_Instances $list, Zend_View_Interface $view, $mainTemplate = 'list_std_main', $other = null, $returnOutput = false)
 {
     if ($other === null) {
         $other = new stdClass();
     }
     $renderedList = $view->partial('partials/list.phtml', array('listName' => $listName, 'instances' => $list, 'mainTemplate' => $mainTemplate, 'other' => $other));
     $this->_owApp->session->lastList = $listName;
     if ($returnOutput) {
         return $renderedList;
     } else {
         $this->getResponse()->append('default', $renderedList);
     }
 }