Пример #1
0
 public function clickAction()
 {
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $request = $this->getRequest();
     $click = App_Model_Mongodb_RequestLog::click($request->getParam('periode'));
     foreach ($click['result'] as $key => $val) {
         $furl = $val['_id'];
         $url = pathinfo($furl);
         $guid = basename($url['dirname']);
         $title = basename($val['_id']);
         $catalogDb = App_Model_Show_Catalog::show()->getCatalogByGuid($guid);
         if ($catalogDb) {
             if ($catalogDb['profileGuid'] == 'klinik') {
                 $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($guid, 'fixedCommentTitle');
             } else {
                 $title = App_Model_Show_CatalogAttribute::show()->getCatalogAttributeValue($guid, 'fixedTitle');
             }
         }
         $click['result'][$key]['title'] = $title;
     }
     $this->getResponse()->setBody(Zend_Json::encode($click));
 }