Exemple #1
0
 public function detailsAction()
 {
     $this->_helper->layout->disableLayout();
     $ngis = new Default_Model_NGIs();
     $ngis->filter->id->equals($this->_getParam('id'));
     if ($ngis->count() >= 1) {
         $this->view->entry = $ngis->items[0];
     }
     $this->view->dialogCount = $this->_getParam('dc');
 }
Exemple #2
0
 /**
  * @overrides get() from RestResource
  */
 public function get()
 {
     if (parent::get() !== false) {
         if ($this->_listMode === RestListModeEnum::RL_NORMAL) {
             $res1 = new Default_Model_Countries();
             $res2 = new Default_Model_Regions();
             $res3 = new Default_Model_NGIs();
             $res1->refresh("xml");
             $res2->refresh("xml");
             $res3->refresh("xml");
             $items = array_merge(array_merge($res1->items, $res2->items), $res3->items);
             $this->_total = count($items);
             return new XMLFragmentRestResponse($items, $this);
         } elseif ($this->_listMode === RestListModeEnum::RL_LISTING) {
             $this->_listMode = RestListModeEnum::RL_NORMAL;
             return $this->_list();
         }
     } else {
         return false;
     }
 }