示例#1
0
 public function getVO()
 {
     if ($this->_vO === null) {
         $VOs = new Default_Model_VOs();
         $VOs->filter->id->equals($this->getVoID());
         if ($VOs->count() > 0) {
             $this->_vO = $VOs->items[0];
         }
     }
     return $this->_vO;
 }
示例#2
0
 public function detailsAction()
 {
     trackPage('vo/details');
     $this->_helper->layout->disableLayout();
     $this->view->canEdit = false;
     if ($this->xml !== null) {
         if ($this->_getParam("id") != null) {
             $vos = new Default_Model_VOs();
             $vos->filter->name->ilike($this->_getParam("id"));
             if (file_exists(APPLICATION_PATH . "/../cache/aggvos.xml")) {
                 $xml = new SimpleXMLElement(APPLICATION_PATH . "/../cache/aggvos.xml", 0, true);
             } else {
                 $xml = new SimpleXMLElement($this->xml);
             }
             $volist = $xml->xpath("//VoDump/IDCard[translate(@Name,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')='" . strtoupper($this->_getParam("id")) . "']");
             if (count($volist) > 0) {
                 $voentry = $volist[0];
                 $vo = $this->populateVO($voentry);
                 if ($vos->count() > 0) {
                     if (isset($vos->items[0])) {
                         $vo->id = $vos->items[0]->id;
                         $vo->guid = $vos->items[0]->guid;
                         $vo->sourceid = $vos->items[0]->sourceid;
                     } else {
                         $vo = null;
                     }
                 } else {
                     $vo->id = "";
                     $vo->guid = "";
                     $vo->sourceid = "";
                 }
                 if (isset($vo)) {
                     $vo->contacts = $this->getContacts($this->_getParam("id"));
                 }
                 $this->view->entry = $vo;
                 $this->view->relatedItems = array();
                 $this->view->relatedItems = array_merge($this->view->relatedItems, $vo->applications);
                 $this->view->relatedItems = array_merge($this->view->relatedItems, $vo->sites);
                 $this->view->canEdit = VoAdmin::canEditVOImageList($this->session->userid, $vo);
             }
         }
         $this->view->session = $this->session;
         $this->view->dialogCount = $this->_getParam('dc');
     } else {
         $this->printError();
     }
 }