public function getDataToShow()
 {
     if (!($log = $this->loadLogEntryData())) {
         return null;
     }
     $data = array();
     if (strpos($log["EVENT_ID"], "crm_") === 0 && Loader::includeModule('crm')) {
         if (strpos($log["EVENT_ID"], "_message") > 0) {
             $connector = new CrmMessageConnector($log["ID"], $this->attachedObject);
             $subData = $connector->getDataToShow();
             $data = array_merge($data, $subData);
         }
         $connector = null;
         if ($log["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Deal) {
             $connector = new CrmDealConnector($log["ENTITY_ID"], $this->attachedObject);
         } elseif ($log["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Lead) {
             $connector = new CrmLeadConnector($log["ENTITY_ID"], $this->attachedObject);
         } elseif ($log["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Company) {
             $connector = new CrmCompanyConnector($log["ENTITY_ID"], $this->attachedObject);
         } elseif ($log["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Contact) {
             $connector = new CrmContactConnector($log["ENTITY_ID"], $this->attachedObject);
         }
         if ($connector) {
             $subData = $connector->getDataToShow();
             $data = array_merge($data, $subData);
         }
         return $data;
     } else {
         return array();
     }
 }
 public function getDataToShow()
 {
     if (!($comment = $this->loadLogCommentData())) {
         return null;
     }
     $return = array();
     if (strpos($comment["EVENT_ID"], "crm_") === 0 && Loader::includeModule('crm')) {
         if (strpos($comment["EVENT_ID"], "_message_comment") > 0) {
             $connector = new CrmMessageCommentConnector($comment["ID"], $this->attachedObject, $comment["LOG_ID"]);
             $subData = $connector->getDataToShow();
             if ($subData["DETAIL_URL"]) {
                 $return["DETAIL_URL"] = $subData["DETAIL_URL"];
             }
             if ($subData["DESCRIPTION"]) {
                 $return["DESCRIPTION"] = $subData["DESCRIPTION"];
             }
         }
         $connector = false;
         if ($comment["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Deal) {
             $connector = new CrmDealConnector($comment["ENTITY_ID"], $this->attachedObject);
         } elseif ($comment["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Lead) {
             $connector = new CrmLeadConnector($comment["ENTITY_ID"], $this->attachedObject);
         } elseif ($comment["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Company) {
             $connector = new CrmCompanyConnector($comment["ENTITY_ID"], $this->attachedObject);
         } elseif ($comment["ENTITY_TYPE"] == \CCrmLiveFeedEntity::Contact) {
             $connector = new CrmContactConnector($comment["ENTITY_ID"], $this->attachedObject);
         }
         if ($connector) {
             $subData = $connector->getDataToShow();
             $return = array_merge($return, $subData);
         }
         return $return;
     } else {
         return array();
     }
 }