1
0

BxBaseModGeneralMenuViewActions.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup BaseGeneral Base classes for modules
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxDolPrivacy');
  12. /**
  13. * View entry social actions menu
  14. */
  15. class BxBaseModGeneralMenuViewActions extends BxTemplMenuCustom
  16. {
  17. protected $_sModule;
  18. protected $_oModule;
  19. protected $_oMenuAction;
  20. protected $_oMenuActionsMore;
  21. protected $_oMenuSocialSharing;
  22. protected $_iContentId;
  23. protected $_aContentInfo;
  24. protected $_bDynamicMode;
  25. protected $_bShowAsButton;
  26. protected $_bShowTitle;
  27. protected $_sClassMiSa; // Separate class for Social Actions (View, Vote, Comment, Report, etc) menu items.
  28. public function __construct($aObject, $oTemplate = false)
  29. {
  30. parent::__construct($aObject, $oTemplate);
  31. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  32. $this->setContentId(bx_process_input(bx_get('id'), BX_DATA_INT));
  33. $this->_oMenuActions = null;
  34. $this->_oMenuActionsMore = null;
  35. $this->_oMenuSocialSharing = null;
  36. $this->_sTmplContent = $this->_oTemplate->getHtml($this->getTemplateName('menu_custom_actions.html'));
  37. $this->_sTmplContentItem = $this->_oTemplate->getHtml($this->getTemplateNameItem('menu_custom_item_actions.html'));
  38. $this->_bShowAsButton = true;
  39. $this->_bShowTitle = true;
  40. $this->_sClassMiSa = 'bx-base-general-ea-sa';
  41. $this->addMarkers(array(
  42. 'module' => $this->_oModule->_oConfig->getName(),
  43. 'module_uri' => $this->_oModule->_oConfig->getUri(),
  44. ));
  45. }
  46. public function addMarkers($a)
  47. {
  48. $bResult = parent::addMarkers($a);
  49. if($bResult && !empty($this->_oMenuSocialSharing))
  50. $this->_oMenuSocialSharing->addMarkers($a);
  51. return $bResult;
  52. }
  53. public function setContentId($iContentId)
  54. {
  55. $this->_iContentId = (int)$iContentId;
  56. $this->_aContentInfo = $this->_oModule->_oDb->getContentInfoById($this->_iContentId);
  57. if($this->_aContentInfo)
  58. $this->addMarkers(array('content_id' => (int)$this->_iContentId));
  59. }
  60. public function setShowAsButton($bShowAsButton)
  61. {
  62. $this->_bShowAsButton = $bShowAsButton;
  63. }
  64. /**
  65. * Check if menu items is visible with extended checking linked to "allow*" method of particular module
  66. * Associated "allow*" method with particular menu item is stored in module config in MENU_ITEM_TO_METHOD array.
  67. * @param $a menu item array
  68. * @return boolean
  69. */
  70. protected function _isVisible($a)
  71. {
  72. if(!parent::_isVisible($a))
  73. return false;
  74. return $this->_oModule->isMenuItemVisible($this->_sObject, $a, $this->_aContentInfo);
  75. }
  76. protected function _isContentPublic($iContentId)
  77. {
  78. $CNF = &$this->_oModule->_oConfig->CNF;
  79. if(empty($CNF['FIELD_ALLOW_VIEW_TO']))
  80. return true;
  81. $aContentInfo = $iContentId == $this->_iContentId ? $this->_aContentInfo : $this->_oModule->_oDb->getContentInfoById($iContentId);
  82. if(!isset($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]))
  83. return true;
  84. return in_array($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']], array(BX_DOL_PG_ALL, BX_DOL_PG_MEMBERS));
  85. }
  86. protected function _getMenuItemDefault($aItem)
  87. {
  88. if(empty($this->_oMenuSocialSharing)) {
  89. $this->_oMenuSocialSharing = BxDolMenu::getObjectInstance('sys_social_sharing');
  90. if($this->_oMenuSocialSharing) {
  91. $this->_oMenuSocialSharing->addMarkers($this->_aMarkers); // adding current markers to social sharing menu object to force it to generate its own markers
  92. $aSocialSharingMarkers = $this->_oMenuSocialSharing->getMarkers(); // getting generated social sharing markers back
  93. $this->addMarkers($aSocialSharingMarkers); // adding all of these to current menu object so now these markers can be parsed for any menu item
  94. }
  95. }
  96. $aItem['class_wrp'] = 'bx-base-general-entity-action' . (!empty($aItem['class_wrp']) ? ' ' . $aItem['class_wrp'] : '');
  97. if($this->_bShowAsButton)
  98. $aItem['class_link'] = 'bx-btn' . (isset($aItem['primary']) && (int)$aItem['primary'] == 1 ? ' bx-btn-primary' : '') . (!empty($aItem['class_link']) ? ' ' . $aItem['class_link'] : '');
  99. if(!$this->_bShowTitle)
  100. $aItem['bx_if:title']['condition'] = false;
  101. if($this->_bIsApi)
  102. return $aItem;
  103. else
  104. return parent::_getMenuItemDefault ($aItem);
  105. }
  106. protected function _getMenuItemView($aItem, $aParams = array())
  107. {
  108. $CNF = &$this->_oModule->_oConfig->CNF;
  109. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  110. if(empty($sObject) && !empty($CNF['OBJECT_VIEWS']))
  111. $sObject = $CNF['OBJECT_VIEWS'];
  112. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  113. if(empty($iId))
  114. $iId = $this->_iContentId;
  115. $oObject = !empty($sObject) ? BxDolView::getObjectInstance($sObject, $iId) : false;
  116. if(!$oObject || !$oObject->isEnabled())
  117. return '';
  118. $aObjectOptions = array(
  119. 'dynamic_mode' => $this->_bDynamicMode,
  120. 'show_do_view_as_button' => $this->_bShowAsButton,
  121. 'show_do_view_label' => $this->_bShowTitle
  122. );
  123. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  124. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  125. if($this->_bIsApi)
  126. return $oObject->getElementApi($aObjectOptions);
  127. $sResult = $oObject->getElementBlock($aObjectOptions);
  128. if(empty($sResult))
  129. return '';
  130. return array($sResult, $this->_sClassMiSa);
  131. }
  132. protected function _getMenuItemComment($aItem, $aParams = array())
  133. {
  134. $CNF = &$this->_oModule->_oConfig->CNF;
  135. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  136. if(empty($sObject) && !empty($CNF['OBJECT_COMMENTS']))
  137. $sObject = $CNF['OBJECT_COMMENTS'];
  138. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  139. if(empty($iId))
  140. $iId = $this->_iContentId;
  141. $oObject = !empty($sObject) ? BxTemplCmts::getObjectInstance($sObject, $iId) : false;
  142. if(!$oObject || !$oObject->isEnabled())
  143. return '';
  144. $aObjectOptions = array(
  145. 'dynamic_mode' => $this->_bDynamicMode,
  146. 'show_do_comment_as_button' => $this->_bShowAsButton,
  147. 'show_do_comment_label' => $this->_bShowTitle,
  148. 'show_counter' => false
  149. );
  150. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  151. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  152. if($this->_bIsApi)
  153. return $oObject->getElementApi($aObjectOptions);
  154. $sResult = $oObject->getElementBlock($aObjectOptions);
  155. if(empty($sResult))
  156. return '';
  157. return array($sResult, $this->_sClassMiSa);
  158. }
  159. protected function _getMenuItemVote($aItem, $aParams = array())
  160. {
  161. $CNF = &$this->_oModule->_oConfig->CNF;
  162. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  163. if(empty($sObject) && !empty($CNF['OBJECT_VOTES']))
  164. $sObject = $CNF['OBJECT_VOTES'];
  165. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  166. if(empty($iId))
  167. $iId = $this->_iContentId;
  168. $oObject = !empty($sObject) ? BxDolVote::getObjectInstance($sObject, $iId) : false;
  169. if(!$oObject || !$oObject->isEnabled())
  170. return '';
  171. $aObjectOptions = array(
  172. 'dynamic_mode' => $this->_bDynamicMode,
  173. 'show_do_vote_as_button' => $this->_bShowAsButton,
  174. 'show_do_vote_label' => $this->_bShowTitle
  175. );
  176. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  177. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  178. if($this->_bIsApi)
  179. return $oObject->getElementApi($aObjectOptions);
  180. $sResult = $oObject->getElementBlock($aObjectOptions);
  181. if(empty($sResult))
  182. return '';
  183. return array($sResult, $this->_sClassMiSa);
  184. }
  185. protected function _getMenuItemReaction($aItem, $aParams = array())
  186. {
  187. $CNF = &$this->_oModule->_oConfig->CNF;
  188. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  189. if(empty($sObject) && !empty($CNF['OBJECT_REACTIONS']))
  190. $sObject = $CNF['OBJECT_REACTIONS'];
  191. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  192. if(empty($iId))
  193. $iId = $this->_iContentId;
  194. $oObject = !empty($sObject) ? BxDolVote::getObjectInstance($sObject, $iId) : false;
  195. if(!$oObject || !$oObject->isEnabled())
  196. return '';
  197. $aObjectOptions = array(
  198. 'dynamic_mode' => $this->_bDynamicMode,
  199. 'show_do_vote_as_button' => $this->_bShowAsButton,
  200. 'show_do_vote_label' => $this->_bShowTitle
  201. );
  202. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  203. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  204. if($this->_bIsApi)
  205. return [
  206. 'id' => $aItem['id'],
  207. 'name' => $aItem['name'],
  208. 'display_type' => 'element',
  209. 'data' => $oObject->getElementApi($aObjectOptions)
  210. ];
  211. $sResult = $oObject->getElementBlock($aObjectOptions);
  212. if(empty($sResult))
  213. return '';
  214. return array($sResult, $this->_sClassMiSa);
  215. }
  216. protected function _getMenuItemScore($aItem, $aParams = array())
  217. {
  218. $CNF = &$this->_oModule->_oConfig->CNF;
  219. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  220. if(empty($sObject) && !empty($CNF['OBJECT_SCORES']))
  221. $sObject = $CNF['OBJECT_SCORES'];
  222. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  223. if(empty($iId))
  224. $iId = $this->_iContentId;
  225. $oObject = !empty($sObject) ? BxDolScore::getObjectInstance($sObject, $iId) : false;
  226. if(!$oObject || !$oObject->isEnabled())
  227. return '';
  228. $aObjectOptions = array(
  229. 'dynamic_mode' => $this->_bDynamicMode,
  230. 'show_do_vote_as_button' => $this->_bShowAsButton,
  231. 'show_do_vote_label' => $this->_bShowTitle
  232. );
  233. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  234. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  235. if($this->_bIsApi)
  236. return $oObject->getElementApi($aObjectOptions);
  237. $sResult = $oObject->getElementBlock($aObjectOptions);
  238. if(empty($sResult))
  239. return '';
  240. return array($sResult, $this->_sClassMiSa);
  241. }
  242. protected function _getMenuItemFavorite($aItem, $aParams = array())
  243. {
  244. $CNF = &$this->_oModule->_oConfig->CNF;
  245. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  246. if(empty($sObject) && !empty($CNF['OBJECT_FAVORITES']))
  247. $sObject = $CNF['OBJECT_FAVORITES'];
  248. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  249. if(empty($iId))
  250. $iId = $this->_iContentId;
  251. $oObject = !empty($sObject) ? BxDolFavorite::getObjectInstance($sObject, $iId) : false;
  252. if(!$oObject || !$oObject->isEnabled())
  253. return '';
  254. $aObjectOptions = array(
  255. 'dynamic_mode' => $this->_bDynamicMode,
  256. 'show_do_favorite_as_button' => $this->_bShowAsButton,
  257. 'show_do_favorite_label' => $this->_bShowTitle
  258. );
  259. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  260. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  261. if($this->_bIsApi)
  262. return $oObject->getElementApi($aObjectOptions);
  263. $sResult = $oObject->getElementBlock($aObjectOptions);
  264. if(empty($sResult))
  265. return '';
  266. return array($sResult, $this->_sClassMiSa);
  267. }
  268. protected function _getMenuItemFeature($aItem, $aParams = array())
  269. {
  270. $CNF = &$this->_oModule->_oConfig->CNF;
  271. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  272. if(empty($sObject) && !empty($CNF['OBJECT_FEATURED']))
  273. $sObject = $CNF['OBJECT_FEATURED'];
  274. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  275. if(empty($iId))
  276. $iId = $this->_iContentId;
  277. if(!$this->_isContentPublic($iId))
  278. return '';
  279. $oObject = !empty($sObject) ? BxDolFeature::getObjectInstance($sObject, $iId) : false;
  280. if(!$oObject || !$oObject->isEnabled())
  281. return '';
  282. $aObjectOptions = array(
  283. 'dynamic_mode' => $this->_bDynamicMode,
  284. 'show_do_feature_as_button' => $this->_bShowAsButton,
  285. 'show_do_feature_label' => $this->_bShowTitle
  286. );
  287. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  288. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  289. if($this->_bIsApi)
  290. return $oObject->getElementApi($aObjectOptions);
  291. $sResult = $oObject->getElementBlock($aObjectOptions);
  292. if(empty($sResult))
  293. return '';
  294. return array($sResult, $this->_sClassMiSa);
  295. }
  296. protected function _getMenuItemRepost($aItem, $aParams = array())
  297. {
  298. $CNF = &$this->_oModule->_oConfig->CNF;
  299. $sAction = !empty($aParams['action']) ? $aParams['action'] : '';
  300. if(empty($sAction))
  301. $sAction = 'added';
  302. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  303. if(empty($iId))
  304. $iId = $this->_iContentId;
  305. $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iId);
  306. if(!empty($CNF['FIELD_PUBLISHED']) && isset($aContentInfo[$CNF['FIELD_PUBLISHED']]) && (int)$aContentInfo[$CNF['FIELD_PUBLISHED']] > time())
  307. return '';
  308. if(!empty($CNF['FIELD_ALLOW_VIEW_TO']) && isset($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]) && (int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']] > 0 && !in_array((int)$aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']], array(BX_DOL_PG_ALL, BX_DOL_PG_MEMBERS)))
  309. return '';
  310. $sStatus = 'active';
  311. if(!empty($CNF['FIELD_STATUS']) && isset($aContentInfo[$CNF['FIELD_STATUS']]) && $aContentInfo[$CNF['FIELD_STATUS']] != $sStatus)
  312. return '';
  313. if(!empty($CNF['FIELD_STATUS_ADMIN']) && isset($aContentInfo[$CNF['FIELD_STATUS_ADMIN']]) && $aContentInfo[$CNF['FIELD_STATUS_ADMIN']] != $sStatus)
  314. return '';
  315. if(!BxDolRequest::serviceExists('bx_timeline', 'get_repost_element_block'))
  316. return '';
  317. if($this->_bIsApi)
  318. return $aItem;
  319. $sResult = BxDolService::call('bx_timeline', 'get_repost_element_block', array(bx_get_logged_profile_id(), $this->_oModule->_oConfig->getName(), $sAction, $iId, array(
  320. 'do' => !empty($aParams['do']) ? $aParams['do'] : 'repost',
  321. 'show_do_repost_as_button' => $this->_bShowAsButton,
  322. 'show_do_repost_text' => $this->_bShowTitle
  323. )));
  324. if(empty($sResult))
  325. return '';
  326. return array($sResult, $this->_sClassMiSa);
  327. }
  328. protected function _getMenuItemRepostWithText($aItem, $aParams = [])
  329. {
  330. return $this->_getMenuItemRepost($aItem, array_merge($aParams, [
  331. 'do' => 'repost_with'
  332. ]));
  333. }
  334. protected function _getMenuItemRepostToContext($aItem, $aParams = [])
  335. {
  336. return $this->_getMenuItemRepost($aItem, array_merge($aParams, [
  337. 'do' => 'repost_to'
  338. ]));
  339. }
  340. protected function _getMenuItemReport($aItem, $aParams = array())
  341. {
  342. $CNF = &$this->_oModule->_oConfig->CNF;
  343. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  344. if(empty($sObject) && !empty($CNF['OBJECT_REPORTS']))
  345. $sObject = $CNF['OBJECT_REPORTS'];
  346. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  347. if(empty($iId))
  348. $iId = $this->_iContentId;
  349. $oObject = !empty($sObject) ? BxDolReport::getObjectInstance($sObject, $iId) : false;
  350. if(!$oObject || !$oObject->isEnabled())
  351. return '';
  352. $aObjectOptions = array(
  353. 'dynamic_mode' => $this->_bDynamicMode,
  354. 'show_do_report_as_button' => $this->_bShowAsButton,
  355. 'show_do_report_label' => $this->_bShowTitle
  356. );
  357. if(!empty($aParams['object_options']) && is_array($aParams['object_options']))
  358. $aObjectOptions = array_merge($aObjectOptions, $aParams['object_options']);
  359. if($this->_bIsApi)
  360. return $oObject->getElementApi($aObjectOptions);
  361. $sResult = $oObject->getElementBlock($aObjectOptions);
  362. if(empty($sResult))
  363. return '';
  364. return array($sResult, $this->_sClassMiSa);
  365. }
  366. protected function _getMenuItemNotes($aItem, $aParams = array())
  367. {
  368. $CNF = &$this->_oModule->_oConfig->CNF;
  369. $sObject = !empty($aParams['object']) ? $aParams['object'] : '';
  370. if(empty($sObject) && !empty($CNF['OBJECT_NOTES']))
  371. $sObject = $CNF['OBJECT_NOTES'];
  372. $iId = !empty($aParams['id']) ? (int)$aParams['id'] : '';
  373. if(empty($iId))
  374. $iId = $this->_iContentId;
  375. if(!$this->_oModule->_isModerator())
  376. return false;
  377. $this->addMarkers(array(
  378. 'content_id' => $iId
  379. ));
  380. return true;
  381. }
  382. protected function _getMenuItemByNameActions($aItem, $aParams = array())
  383. {
  384. $CNF = &$this->_oModule->_oConfig->CNF;
  385. if(empty($this->_oMenuActions)) {
  386. $sObjectMenu = !empty($aParams['object_menu']) ? $aParams['object_menu'] : '';
  387. if(empty($sObjectMenu) && !empty($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY']))
  388. $sObjectMenu = $CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY'];
  389. if(empty($sObjectMenu))
  390. return '';
  391. $this->_oMenuActions = BxDolMenu::getObjectInstance($sObjectMenu);
  392. if(!$this->_oMenuActions)
  393. return '';
  394. $this->_oMenuActions->setContentId($this->_iContentId);
  395. $this->addMarkers($this->_oMenuActions->getMarkers());
  396. }
  397. $aItem = $this->_oMenuActions->getMenuItem($aItem['name']);
  398. if(empty($aItem) || !is_array($aItem))
  399. return false;
  400. if($this->_bIsApi)
  401. return $aItem;
  402. else
  403. return $this->_getMenuItemDefault($aItem);
  404. }
  405. protected function _getMenuItemByNameSocialSharing($aItem, $aParams = array())
  406. {
  407. if(empty($this->_oMenuSocialSharing)) {
  408. $this->_oMenuSocialSharing = BxDolMenu::getObjectInstance('sys_social_sharing');
  409. if(!$this->_oMenuSocialSharing)
  410. return false;
  411. $this->_oMenuSocialSharing->addMarkers($this->_aMarkers);
  412. $this->addMarkers($this->_oMenuSocialSharing->getMarkers());
  413. }
  414. $aItem = $this->_oMenuSocialSharing->getMenuItem($aItem['name']);
  415. if(empty($aItem) || !is_array($aItem))
  416. return false;
  417. if($this->_bIsApi)
  418. return $aItem;
  419. else
  420. return $this->_getMenuItemDefault($aItem);
  421. }
  422. protected function _getMenuItemByNameActionDelete($aItem)
  423. {
  424. $oProfile = $this->_oModule->getProfileObject(($this->_iContentId));
  425. if (!$this->_oModule->isAllowDeleteOrDisable(bx_get_logged_profile_id(), $oProfile->id()))
  426. return false;
  427. return $this->_getMenuItemByNameActionsMore($aItem);
  428. }
  429. protected function _getMenuItemByNameActionsMore($aItem)
  430. {
  431. $CNF = &$this->_oModule->_oConfig->CNF;
  432. if(empty($this->_oMenuActionsMore)) {
  433. if(empty($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE']))
  434. return '';
  435. $this->_oMenuActionsMore = BxDolMenu::getObjectInstance($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY_MORE']);
  436. if(!$this->_oMenuActionsMore)
  437. return '';
  438. $this->_oMenuActionsMore->setContentId($this->_iContentId);
  439. $this->addMarkers($this->_oMenuActionsMore->getMarkers());
  440. }
  441. $aItem = $this->_oMenuActionsMore->getMenuItem($aItem['name']);
  442. if(empty($aItem) || !is_array($aItem))
  443. return false;
  444. if($this->_bIsApi)
  445. return $aItem;
  446. else
  447. return $this->_getMenuItemDefault($aItem);
  448. }
  449. }
  450. /** @} */