BxTimelineConfig.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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 Timeline Timeline
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxDolPrivacy');
  12. class BxTimelineConfig extends BxBaseModNotificationsConfig
  13. {
  14. protected $_aTypeToFormDisplay;
  15. protected $_bAllowEdit;
  16. protected $_bAllowDelete;
  17. protected $_bShowAll;
  18. protected $_bCountAllViews;
  19. protected $_bCacheItem;
  20. protected $_sCacheItemEngine;
  21. protected $_iCacheItemLifetime;
  22. protected $_bCacheList;
  23. protected $_aCacheListExceptions;
  24. protected $_iRssLength;
  25. protected $_iLiveUpdateLength;
  26. protected $_iCharsDisplayMaxTitle;
  27. protected $_sVideosAutoplay;
  28. protected $_iPreloadComments;
  29. protected $_iPreloadCommentsMax;
  30. protected $_bHot;
  31. protected $_iHotInterval;
  32. protected $_bEditorToolbar;
  33. protected $_bUnhideRestored;
  34. protected $_sStorageObject;
  35. protected $_sTranscoderObjectPreview;
  36. protected $_sTranscoderObjectView;
  37. protected $_aPhotoUploaders;
  38. protected $_aVideoUploaders;
  39. protected $_sMenuItemManage;
  40. protected $_sMenuItemActions;
  41. protected $_aRepostDefaults;
  42. protected $_iTimelineVisibilityThreshold;
  43. protected $_aPregPatterns;
  44. /**
  45. * Constructor
  46. */
  47. public function __construct($aModule)
  48. {
  49. parent::__construct($aModule);
  50. $this->CNF = array (
  51. 'ICON' => 'far clock col-green1',
  52. // database tables
  53. 'TABLE_ENTRIES' => $aModule['db_prefix'] . 'events',
  54. // database fields
  55. 'FIELD_ID' => 'id',
  56. 'FIELD_OWNER_ID' => 'owner_id',
  57. 'FIELD_OBJECT_ID' => 'object_id', //Note. For 'Direct Timeline Posts' this field contains post's author profile ID.
  58. 'FIELD_OBJECT_PRIVACY_VIEW' => 'object_privacy_view',
  59. 'FIELD_ADDED' => 'date',
  60. 'FIELD_PUBLISHED' => 'published',
  61. 'FIELD_TITLE' => 'title',
  62. 'FIELD_TEXT' => 'description',
  63. 'FIELD_STATUS' => 'status',
  64. 'FIELD_DATE' => 'date',
  65. 'FIELD_ANONYMOUS' => 'anonymous',
  66. 'FIELD_CONTROLS' => 'controls',
  67. 'FIELD_LOCATION_PREFIX' => 'location',
  68. 'FIELDS_DELAYED_PROCESSING' => 'video', // can be array of fields or comma separated string of field names
  69. // page URIs
  70. 'URI_VIEW_LIST' => 'timeline-view',
  71. 'URI_VIEW_ENTRY' => 'item',
  72. 'URL_HOME' => 'page.php?i=timeline-view-home',
  73. // objects
  74. 'OBJECT_STORAGE' => $this->_sName . '_photos',
  75. 'OBJECT_STORAGE_VIDEOS' => $this->_sName . '_videos',
  76. 'OBJECT_IMAGES_TRANSCODER_PREVIEW' => $this->_sName . '_photos_preview',
  77. 'OBJECT_VIDEOS_TRANSCODERS' => array(
  78. 'poster' => 'bx_timeline_videos_poster',
  79. 'mp4' => 'bx_timeline_videos_mp4',
  80. 'mp4_hd' => 'bx_timeline_videos_mp4_hd'
  81. ),
  82. 'OBJECT_GRID_ADMINISTRATION' => $this->_sName . '_administration',
  83. 'OBJECT_MENU_ENTRY_ATTACHMENTS' => $this->_sName . '_menu_post_attachments',
  84. 'OBJECT_METATAGS' => $this->_sName,
  85. 'OBJECT_COMMENTS' => $this->_sName,
  86. 'OBJECT_VIEWS' => $this->_sName,
  87. 'OBJECT_VOTES' => $this->_sName,
  88. 'OBJECT_REACTIONS' => $this->_sName . '_reactions',
  89. 'OBJECT_SCORES' => $this->_sName,
  90. 'OBJECT_REPORTS' => $this->_sName,
  91. // some language keys
  92. 'T' => array (
  93. 'txt_status_deleted' => '_bx_timeline_txt_status_deleted',
  94. 'txt_sample_single' => '_bx_timeline_txt_sample',
  95. 'txt_sample_single_ext' => '_bx_timeline_txt_sample_ext',
  96. 'txt_sample_comment_single' => '_bx_timeline_txt_sample_comment_single',
  97. 'txt_sample_vote_single' => '_bx_timeline_txt_sample_vote_single',
  98. 'txt_sample_reaction_single' => '_bx_timeline_txt_sample_reaction_single',
  99. 'txt_sample_score_up_single' => '_bx_timeline_txt_sample_score_up_single',
  100. 'txt_sample_score_down_single' => '_bx_timeline_txt_sample_score_down_single',
  101. 'txt_sample_with_link' => '_bx_timeline_txt_sample_with_link',
  102. 'txt_sample_with_image' => '_bx_timeline_txt_sample_with_image',
  103. 'txt_sample_with_video' => '_bx_timeline_txt_sample_with_video',
  104. 'txt_sample_with_media' => '_bx_timeline_txt_sample_with_media',
  105. 'grid_action_err_delete' => '_bx_timeline_grid_action_err_delete',
  106. 'grid_txt_account_manager' => '_bx_timeline_grid_txt_account_manager',
  107. ),
  108. );
  109. $this->_aTypeToFormDisplay = array(
  110. BX_BASE_MOD_NTFS_TYPE_OWNER => 'form_display_post_add_profile',
  111. BX_BASE_MOD_NTFS_TYPE_PUBLIC => 'form_display_post_add_public',
  112. BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS => 'form_display_post_add'
  113. );
  114. $this->_aPrefixes = array(
  115. 'style' => 'bx-tl',
  116. 'language' => '_bx_timeline',
  117. 'option' => 'bx_timeline_',
  118. 'common_post' => 'timeline_common_',
  119. 'cache_item' => 'bx_timeline_item_'
  120. );
  121. $this->_aObjects = array_merge($this->_aObjects, array(
  122. 'comment' => $this->CNF['OBJECT_COMMENTS'],
  123. 'view' => $this->CNF['OBJECT_VIEWS'],
  124. 'vote' => $this->CNF['OBJECT_VOTES'],
  125. 'reaction' => $this->CNF['OBJECT_REACTIONS'],
  126. 'score' => $this->CNF['OBJECT_SCORES'],
  127. 'report' => $this->CNF['OBJECT_REPORTS'],
  128. 'metatags' => $this->_sName,
  129. 'storage_photos' => $this->CNF['OBJECT_STORAGE'],
  130. 'storage_videos' => $this->CNF['OBJECT_STORAGE_VIDEOS'],
  131. 'transcoder_photos_preview' => $this->CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW'],
  132. 'transcoder_photos_view' => $this->_sName . '_photos_view',
  133. 'transcoder_photos_medium' => $this->_sName . '_photos_medium',
  134. 'transcoder_photos_big' => $this->_sName . '_photos_big',
  135. 'transcoder_videos_poster' => $this->CNF['OBJECT_VIDEOS_TRANSCODERS']['poster'],
  136. 'transcoder_videos_mp4' => $this->CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4'],
  137. 'transcoder_videos_mp4_hd' => $this->CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4_hd'],
  138. 'page_item_brief' => $this->_sName . '_item_brief',
  139. 'menu_item_manage' => $this->_sName . '_menu_item_manage',
  140. 'menu_item_actions' => $this->_sName . '_menu_item_actions',
  141. 'menu_item_meta' => $this->_sName . '_menu_item_meta',
  142. 'menu_post_attachments' => $this->CNF['OBJECT_MENU_ENTRY_ATTACHMENTS'],
  143. 'form_post' => $this->_sName . '_post',
  144. 'form_attach_link' => $this->_sName . '_attach_link',
  145. 'form_display_post_add' => $this->_sName . '_post_add',
  146. 'form_display_post_add_public' => $this->_sName . '_post_add_public',
  147. 'form_display_post_add_profile' => $this->_sName . '_post_add_profile',
  148. 'form_display_post_edit' => $this->_sName . '_post_edit',
  149. 'form_display_attach_link_add' => $this->_sName . '_attach_link_add'
  150. ));
  151. $this->_aHandlerDescriptor = array('module_name' => '', 'module_method' => '', 'module_class' => '', 'groupable' => '', 'group_by' => '');
  152. $this->_sHandlersMethod = 'get_timeline_data';
  153. $this->_aPhotoUploaders = array($this->_sName . '_simple_photo');
  154. $this->_aVideoUploaders = array($this->_sName . '_simple_video');
  155. $this->_bJsMode = false;
  156. $this->_aJsClasses = array(
  157. 'main' => 'BxTimelineMain',
  158. 'view' => 'BxTimelineView',
  159. 'post' => 'BxTimelinePost',
  160. 'repost' => 'BxTimelineRepost',
  161. 'manage_tools' => 'BxTimelineManageTools'
  162. );
  163. $this->_aJsObjects = array(
  164. 'view' => 'oTimelineView',
  165. 'post' => 'oTimelinePost',
  166. 'repost' => 'oTimelineRepost',
  167. 'manage_tools' => 'oBxTimelineManageTools'
  168. );
  169. $this->_aGridObjects = array(
  170. 'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION']
  171. );
  172. $sHp = str_replace('_', '-', $this->_sName);
  173. $sHpT = BX_TIMELINE_VIEW_TIMELINE;
  174. $sHpO = BX_TIMELINE_VIEW_OUTLINE;
  175. $this->_aHtmlIds = array(
  176. 'view' => array(
  177. 'edit_form' => $sHp . '-edit-',
  178. 'menu_popup' => $sHp . '-menu-popup-',
  179. 'video_iframe' => $sHp . '-video-iframe-',
  180. 'video' => $sHp . '-video-',
  181. 'live_update_popup' => $sHp . '-live-update-popup-',
  182. ),
  183. 'post' => array(
  184. 'attach_link_popup' => $sHp . '-attach-link-popup',
  185. 'attach_link_form_field' => $sHp . '-attach-link-form_field',
  186. 'attach_link_item' => $sHp . '-attach-link-item-',
  187. 'textarea' => $sHp . '-textarea-',
  188. 'main_' . $sHpT => $sHp . '-' . $sHpT,
  189. 'main_' . $sHpO => $sHp . '-' . $sHpO,
  190. ),
  191. 'repost' => array(
  192. 'main' => $sHp . '-repost-',
  193. 'counter' => $sHp . '-repost-counter-',
  194. 'by_popup' => $sHp . '-repost-by-',
  195. )
  196. );
  197. $this->_aRepostDefaults = array(
  198. 'show_do_repost_as_button' => false,
  199. 'show_do_repost_as_button_small' => false,
  200. 'show_do_repost_image' => false,
  201. 'show_do_repost_icon' => true,
  202. 'show_do_repost_text' => false,
  203. 'show_counter' => true,
  204. //--- Images
  205. 'image_do_repost' => '',
  206. //--- Icons
  207. 'icon_do_repost' => 'sync-alt',
  208. //--- Texts
  209. 'text_do_repost' => '_bx_timeline_txt_do_repost',
  210. //--- Templates
  211. 'template_do_repost_label' => '',
  212. 'template_do_repost_label_name' => 'repost_do_repost_label.html',
  213. );
  214. $this->_iTimelineVisibilityThreshold = 0;
  215. $this->_aPregPatterns = array(
  216. "meta_title" => "/<title>(.*)<\/title>/",
  217. "meta_description" => "/<meta[\s]+[^>]*?name[\s]?=[\s\"\']+description[\s\"\']+content[\s]?=[\s\"\']+(.*?)[\"\']+.*?>/",
  218. "url" => "/(([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?/"
  219. );
  220. }
  221. public function init(&$oDb)
  222. {
  223. parent::init($oDb);
  224. $sOptionPrefix = $this->getPrefix('option');
  225. $this->_bAllowEdit = getParam($sOptionPrefix . 'enable_edit') == 'on';
  226. $this->_bAllowDelete = getParam($sOptionPrefix . 'enable_delete') == 'on';
  227. $this->_bShowAll = getParam($sOptionPrefix . 'enable_show_all') == 'on';
  228. $this->_bCountAllViews = getParam($sOptionPrefix . 'enable_count_all_views') == 'on';
  229. $this->_bCacheItem = getParam($sOptionPrefix . 'enable_cache_item') == 'on';
  230. $this->_sCacheItemEngine = getParam($sOptionPrefix . 'cache_item_engine');
  231. $this->_iCacheItemLifetime = (int)getParam($sOptionPrefix . 'cache_item_lifetime');
  232. $this->_bCacheList = getParam($sOptionPrefix . 'enable_cache_list') == 'on';
  233. $this->_aCacheListExceptions = array(BX_TIMELINE_TYPE_HOT);
  234. $this->_aPerPage = array(
  235. 'default' => (int)getParam($sOptionPrefix . 'events_per_page'),
  236. 'profile' => (int)getParam($sOptionPrefix . 'events_per_page_profile'),
  237. 'account' => (int)getParam($sOptionPrefix . 'events_per_page_account'),
  238. 'home' => (int)getParam($sOptionPrefix . 'events_per_page_home')
  239. );
  240. $this->_iRssLength = (int)getParam($sOptionPrefix . 'rss_length');
  241. $this->_iLiveUpdateLength = 10;
  242. $this->_iCharsDisplayMaxTitle = 20;
  243. $this->_sVideosAutoplay = getParam($sOptionPrefix . 'videos_autoplay');
  244. $this->_iPreloadCommentsMax = 7;
  245. $this->_iPreloadComments = (int)getParam($sOptionPrefix . 'preload_comments');
  246. if($this->_iPreloadComments > $this->_iPreloadCommentsMax)
  247. $this->_iPreloadComments = $this->_iPreloadCommentsMax;
  248. $this->_bHot = getParam($sOptionPrefix . 'enable_hot') == 'on';
  249. $this->_iHotInterval = (int)getParam($sOptionPrefix . 'hot_interval');
  250. $this->_bEditorToolbar = getParam($sOptionPrefix . 'enable_editor_toolbar') == 'on';
  251. $this->_bUnhideRestored = false;
  252. }
  253. protected function getNameView($aParams, $bWithOwner = false, $sGlue = '_')
  254. {
  255. $aAddons = array();
  256. if(!empty($aParams['name']))
  257. $aAddons[] = $aParams['name'];
  258. else {
  259. if(!empty($aParams['view']))
  260. $aAddons[] = $aParams['view'];
  261. if(!empty($aParams['type']))
  262. $aAddons[] = $aParams['type'];
  263. }
  264. if($bWithOwner)
  265. $aAddons[] = $aParams['owner_id'];
  266. return !empty($aAddons) ? implode('_', $aAddons) : '';
  267. }
  268. /**
  269. * Generates unique JS object name for View events block.
  270. *
  271. * @param array $aParams - an array with browsing params received in View block service method
  272. * @return string with JS object name
  273. */
  274. public function getJsObjectView($aParams = array())
  275. {
  276. return parent::getJsObject('view') . bx_gen_method_name($this->getNameView($aParams));
  277. }
  278. public function getHtmlIdView($sKey, $aParams, $bWhole = true)
  279. {
  280. $sDiv = '_';
  281. return str_replace($sDiv, '-', $this->_sName . $sDiv . $sKey . $sDiv . $this->getNameView($aParams) . (!$bWhole ? $sDiv : ''));
  282. }
  283. public function isAllowEdit()
  284. {
  285. return $this->_bAllowEdit;
  286. }
  287. public function isAllowDelete()
  288. {
  289. return $this->_bAllowDelete;
  290. }
  291. public function isShowAll()
  292. {
  293. return $this->_bShowAll;
  294. }
  295. public function isCountAllViews()
  296. {
  297. return $this->_bCountAllViews;
  298. }
  299. public function isHot()
  300. {
  301. return $this->_bHot;
  302. }
  303. public function isEditorToolbar()
  304. {
  305. return $this->_bEditorToolbar;
  306. }
  307. public function isUnhideRestored()
  308. {
  309. return $this->_bUnhideRestored;
  310. }
  311. public function isCacheItem()
  312. {
  313. return $this->_bCacheItem;
  314. }
  315. public function isCacheList()
  316. {
  317. return $this->_bCacheList;
  318. }
  319. public function isCacheListException($sType)
  320. {
  321. return in_array($sType, $this->_aCacheListExceptions);
  322. }
  323. public function getCacheItemEngine()
  324. {
  325. return $this->_sCacheItemEngine;
  326. }
  327. public function getCacheItemLifetime()
  328. {
  329. return $this->_iCacheItemLifetime;
  330. }
  331. public function getCacheItemKey($iId, $sPostfix = '')
  332. {
  333. return $this->getPrefix('cache_item') . $iId . (!empty($sPostfix) ? '_' . $sPostfix : '') . '.php';
  334. }
  335. public function getPostFormDisplay($sType)
  336. {
  337. if(empty($sType) || !array_key_exists($sType, $this->_aTypeToFormDisplay))
  338. $sType = BX_TIMELINE_TYPE_DEFAULT;
  339. return $this->_aTypeToFormDisplay[$sType];
  340. }
  341. public function getUploaders($sType)
  342. {
  343. $aResult = array();
  344. switch($sType) {
  345. case 'photo':
  346. $aResult = $this->_aPhotoUploaders;
  347. break;
  348. case 'video':
  349. $aResult = $this->_aVideoUploaders;
  350. break;
  351. }
  352. return $aResult;
  353. }
  354. public function getRssLength()
  355. {
  356. return $this->_iRssLength;
  357. }
  358. public function getLiveUpdateLength()
  359. {
  360. return $this->_iLiveUpdateLength;
  361. }
  362. public function getCharsDisplayMaxTitle()
  363. {
  364. return $this->_iCharsDisplayMaxTitle;
  365. }
  366. public function getVideosAutoplay()
  367. {
  368. return $this->_sVideosAutoplay;
  369. }
  370. public function getPreloadComments()
  371. {
  372. return $this->_iPreloadComments;
  373. }
  374. public function getHotInterval()
  375. {
  376. return $this->_iHotInterval;
  377. }
  378. public function getRepostDefaults()
  379. {
  380. return $this->_aRepostDefaults;
  381. }
  382. public function getPregPattern($sType)
  383. {
  384. return $this->_aPregPatterns[$sType];
  385. }
  386. /**
  387. * Ancillary functions
  388. */
  389. public function getTitle($s, $mixedProfile = false)
  390. {
  391. if($mixedProfile !== false) {
  392. if(is_numeric($mixedProfile))
  393. $mixedProfile = BxDolProfile::getInstanceMagic((int)$mixedProfile);
  394. if($mixedProfile instanceof BxDolProfile)
  395. $s = bx_replace_markers($s, array(
  396. 'profile_name' => $mixedProfile->getDisplayName()
  397. ));
  398. }
  399. return strmaxtextlen($s, $this->getCharsDisplayMaxTitle(), '...');
  400. }
  401. public function getTitleDefault($bL, $bP, $bV)
  402. {
  403. $sResult = '';
  404. if($bL && !$bP && !$bV)
  405. $sResult = 'link';
  406. else if(!$bL && $bP && !$bV)
  407. $sResult = 'image';
  408. else if(!$bL && !$bP && $bV)
  409. $sResult = 'video';
  410. else
  411. $sResult = 'media';
  412. return $this->CNF['T']['txt_sample_with_' . $sResult];
  413. }
  414. public function getViewUrl($iOwnerId)
  415. {
  416. return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
  417. 'i' => $this->CNF['URI_VIEW_LIST'],
  418. 'id' => $iOwnerId
  419. ));
  420. }
  421. public function getHomeViewUrl()
  422. {
  423. return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->CNF['URL_HOME']);
  424. }
  425. public function getItemViewUrl($aEvent)
  426. {
  427. return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php', array(
  428. 'i' => $this->CNF['URI_VIEW_ENTRY'],
  429. 'id' => $aEvent['id']
  430. ));
  431. }
  432. public function getLiveUpdateKey($aParams)
  433. {
  434. return $this->getName() . '_live_update_' . $this->getNameView($aParams, true);
  435. }
  436. public function isCommon($sType, $sAction)
  437. {
  438. return !$this->isSystem($sType, $sAction);
  439. }
  440. public function isSystem($sType, $sAction)
  441. {
  442. $sPrefix = $this->getPrefix('common_post');
  443. return strpos($sType, $sPrefix) === false && !empty($sAction);
  444. }
  445. public function getSystemData(&$aEvent, $aBrowseParams = array())
  446. {
  447. $sHandler = $aEvent['type'] . '_' . $aEvent['action'];
  448. if(!$this->isHandler($sHandler))
  449. return false;
  450. $aHandler = $this->getHandlers($sHandler);
  451. if(empty($aHandler['module_name']) || empty($aHandler['module_class']) || empty($aHandler['module_method']))
  452. return false;
  453. return BxDolService::call($aHandler['module_name'], $aHandler['module_method'], array($aEvent, $aBrowseParams), $aHandler['module_class']);
  454. }
  455. public function getSystemDataByDescriptor($sType, $sAction, $iObjectId)
  456. {
  457. $aDescriptor = array(
  458. 'type' => $sType,
  459. 'action' => $sAction,
  460. 'object_id' => $iObjectId
  461. );
  462. return $this->getSystemData($aDescriptor);
  463. }
  464. public function isEqualUrls($sUrl1, $sUrl2)
  465. {
  466. $sUrl1 = trim($sUrl1, "/");
  467. $sUrl2 = trim($sUrl2, "/");
  468. return strncmp($sUrl1, $sUrl2, strlen($sUrl1)) === 0;
  469. }
  470. public function addBrowseParams($sUrl, $aParams, $sKey = 'bp')
  471. {
  472. return bx_append_url_params($sUrl, array($sKey => urlencode(base64_encode(serialize($aParams)))));
  473. }
  474. public function getBrowseParams($sValue)
  475. {
  476. return unserialize(base64_decode(urldecode($sValue)));
  477. }
  478. }
  479. /** @} */