Ejemplo n.º 1
0
 public function indexAction()
 {
     $initiatives = InitiativeModel::getAll(true);
     $array = array();
     foreach ($initiatives as $init) {
         $array[] = array('initiativeId' => $init->getMetadata('id'), 'initiativeTitle' => $init->getMetadata('title'));
     }
     $this->view->array = $array;
 }
Ejemplo n.º 2
0
 public function initiativesAction()
 {
     try {
         $this->view->initiatives = InitiativeModel::getAll();
         $this->view->roots = LocationModel::getLocTreeRoots();
     } catch (Exception $e) {
         $this->view->error = $e->getMessage();
         Globals::getLog()->err('ADMIN fetch initiatives error: ' . $this->view->error);
         $this->render('error');
         return false;
     }
 }