Просмотр исходного кода

Ticket #4558 - Build-in API support: Universal service getMenu.

AntonLV 2 лет назад
Родитель
Сommit
bcec08523f

+ 12 - 0
modules/boonex/timeline/classes/BxTimelineMenuItemManage.php

@@ -61,6 +61,18 @@ class BxTimelineMenuItemManage extends BxTimelineMenuItemActions
 
         return parent::setContentParams($aParams);
     }
+
+    public function setEvent($aEvent, $aBrowseParams = [])
+    {
+        $bResult = parent::setEvent($aEvent);
+
+        if($bResult) 
+            $this->_aContentParams = array_merge($this->_aContentParams, [
+                'content_id' => $this->_iEvent
+            ]);
+
+        return $bResult;
+    }
 }
 
 /** @} */

+ 11 - 0
template/scripts/BxBaseCmtsMenuManage.php

@@ -51,6 +51,17 @@ class BxBaseCmtsMenuManage extends BxTemplCmtsMenuActions
 
         return parent::setContentParams($aParams);
     }
+
+    public function setCmtsData($oCmts, $iCmtId, $aBp = [], $aDp = [])
+    {
+        parent::setCmtsData($oCmts, $iCmtId, $aBp, $aDp);
+
+        $this->_aContentParams = array_merge($this->_aContentParams, [
+            'cmt_system' => $this->_oCmts->getSystemName(),
+            'cmt_object_id' => $this->_oCmts->getId(),
+            'cmt_id' => (int)$this->_aCmt['cmt_id']
+        ]);
+    }
 }
 
 /** @} */