1
0

BxBasePage.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  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 UnaBaseView UNA Base Representation Classes
  7. * @{
  8. */
  9. require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');
  10. /**
  11. * Page representation.
  12. * @see BxDolPage
  13. */
  14. class BxBasePage extends BxDolPage
  15. {
  16. protected $_oTemplate;
  17. protected $_sStorage; //--- Storage object for page's images like custom cover, HTML block attachments, etc.
  18. protected $_oPageCacheObject = null;
  19. public function __construct ($aObject, $oTemplate)
  20. {
  21. parent::__construct ($aObject);
  22. if ($oTemplate)
  23. $this->_oTemplate = $oTemplate;
  24. else
  25. $this->_oTemplate = BxDolTemplate::getInstance();
  26. $this->_sStorage = 'sys_images';
  27. $this->_sJsClassName = 'BxDolPage';
  28. $this->_sJsObjectName = 'oBxDolPage';
  29. }
  30. /**
  31. * Very similar to BxBasePage::getCode
  32. * but adds css and js files which are needed for the corect page display
  33. */
  34. public function getCodeDynamic ()
  35. {
  36. $oTemplate = BxDolTemplate::getInstance();
  37. // get js&css before the page code is generated
  38. $aCssBefore = $oTemplate->getCss();
  39. $aJsBefore = $oTemplate->getJs();
  40. // generate page code
  41. $sContent = $this->getCode();
  42. // get js&css after the page code is generated
  43. $aCssAfter = $oTemplate->getCss();
  44. $aJsAfter = $oTemplate->getJs();
  45. // compare files which were added before and after page code is generated
  46. $f = function ($a1, $a2) {
  47. return strcasecmp($a1['url'], $a2['url']);
  48. };
  49. $aCssNew = array_udiff($aCssAfter, $aCssBefore, $f);
  50. $aJsNew = array_udiff($aJsAfter, $aJsBefore, $f);
  51. // add newly added js&css files in static mode
  52. $sCss = $sJs = '';
  53. foreach ($aCssNew as $a)
  54. $sCss .= $oTemplate->addCss($a['url'], true);
  55. foreach ($aJsNew as $a)
  56. $sJs .= $oTemplate->addJs($a['url'], true);
  57. return $sJs . $sCss . $sContent;
  58. }
  59. /**
  60. * Get page code with automatic caching, adding necessary css/js files and system template vars.
  61. * @return string.
  62. */
  63. public function getCode ()
  64. {
  65. if (bx_get('dynamic') && ($iBlockId = (int)bx_get('pageBlock'))) {
  66. if (!$this->_isVisiblePage($this->_aObject)) {
  67. header('HTTP/1.0 403 Forbidden');
  68. exit;
  69. }
  70. bx_alert('system', 'page_output_block', 0, false, array(
  71. 'page_name' => $this->_sObject,
  72. 'page_object' => $this,
  73. 'page_query' => $this->_oQuery,
  74. 'block_id' => (int)$iBlockId,
  75. ));
  76. header( 'Content-type:text/html;charset=utf-8' );
  77. echo $this->_getBlockOnlyCode($iBlockId);
  78. exit;
  79. }
  80. if (!$this->_isVisiblePage($this->_aObject))
  81. return $this->_getPageAccessDeniedMsg ();
  82. $this->_addJsCss();
  83. $this->_addSysTemplateVars();
  84. $this->_selectMenu();
  85. $this->_setSubmenu(array());
  86. if (!getParam('sys_page_cache_enable') || !$this->_aObject['cache_lifetime']) {
  87. $sPageCode = $this->_getPageCode();
  88. }
  89. else {
  90. $oCache = $this->_getPageCacheObject();
  91. $sKey = $this->_getPageCacheKey();
  92. $mixedRet = $oCache->getData($sKey, $this->_aObject['cache_lifetime']);
  93. if ($mixedRet !== null) {
  94. $sPageCode = $mixedRet;
  95. } else {
  96. $sPageCode = $this->_getPageCode();
  97. $oCache->setData($sKey, $sPageCode, $this->_aObject['cache_lifetime']);
  98. }
  99. }
  100. bx_alert('system', 'page_output', 0, false, array(
  101. 'page_name' => $this->_sObject,
  102. 'page_object' => $this,
  103. 'page_query' => $this->_oQuery,
  104. 'page_code' => &$sPageCode,
  105. ));
  106. $sPageCode .= $this->getJsScript();
  107. return $sPageCode;
  108. }
  109. public function getJsClassName()
  110. {
  111. return $this->_sJsClassName;
  112. }
  113. public function getJsObjectName()
  114. {
  115. return $this->_sJsObjectName;
  116. }
  117. function _wrapInTagJsCode($sCode)
  118. {
  119. return "<script language=\"javascript\">\n<!--\n" . $sCode . "\n-->\n</script>";
  120. }
  121. public function getJsScript()
  122. {
  123. $sJsObjName = $this->getJsObjectName();
  124. $sJsObjClass = $this->getJsClassName();
  125. $sCode = "if(window['" . $sJsObjName . "'] == undefined) var " . $sJsObjName . " = new " . $sJsObjClass . "(" . json_encode(array(
  126. 'sObjName' => $sJsObjName,
  127. 'isStickyColumns' => isset($this->_aObject['sticky_columns']) && $this->_aObject['sticky_columns'] == 1
  128. )) . ");";
  129. return $this->_wrapInTagJsCode($sCode);
  130. }
  131. /**
  132. * Is page cover enabled.
  133. * @return string
  134. */
  135. public function isPageCover()
  136. {
  137. $bResult = false;
  138. switch((int)$this->_aObject['cover']) {
  139. case 1: //--- Enabled for all
  140. $bResult = true;
  141. break;
  142. case 2: //--- Enabled for visitors only
  143. $bResult = !isLogged();
  144. break;
  145. case 3: //--- Enabled for members only
  146. $bResult = isLogged();
  147. break;
  148. }
  149. return $bResult;
  150. }
  151. public function setPageCover($bCover = true)
  152. {
  153. $this->_aObject['cover'] = (bool)$bCover;
  154. }
  155. public function getPageCoverImage($bTranscoder = true)
  156. {
  157. $iId = (int)$this->_aObject['cover_image'];
  158. if(empty($iId)) {
  159. $iId = (int)getParam('sys_site_cover_common');
  160. if(empty($iId))
  161. return array();
  162. }
  163. $aResult = array(
  164. 'id' => $iId
  165. );
  166. if($bTranscoder)
  167. $aResult['transcoder'] = BX_DOL_TRANSCODER_OBJ_COVER;
  168. else
  169. $aResult['object'] = $this->_sStorage;
  170. return $aResult;
  171. }
  172. public function getPageCoverParams()
  173. {
  174. $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
  175. if($oMenuSubmenu) {
  176. $aParams = $oMenuSubmenu->getPageCoverParams();
  177. if(!empty($aParams) && is_array($aParams))
  178. return $aParams;
  179. }
  180. return array (
  181. 'title' => $this->_getPageTitle(),
  182. 'actions' => '',
  183. 'bx_if:image' => array (
  184. 'condition' => false,
  185. 'content' => array(),
  186. ),
  187. 'bx_if:icon' => array (
  188. 'condition' => false,
  189. 'content' => array(),
  190. ),
  191. );
  192. }
  193. /**
  194. * Get block title.
  195. * @return string
  196. */
  197. public function getBlockTitle ($aBlock)
  198. {
  199. return $this->_replaceMarkers(_t($aBlock['title']), array('block_id' => $aBlock['id']));
  200. }
  201. /**
  202. * Get page array with all cells and blocks
  203. */
  204. public function getPage ()
  205. {
  206. return array(
  207. 'id' => $this->_aObject['id'],
  208. 'title' => $this->_getPageTitle(),
  209. 'uri' => $this->_aObject['uri'],
  210. 'author' => $this->_aObject['author'],
  211. 'added' => $this->_aObject['added'],
  212. 'module' => $this->getModule (),
  213. 'type' => $this->getType (),
  214. 'layout' => $this->_aObject['layout_id'],
  215. 'elements' => $this->getPageBlocks (),
  216. );
  217. }
  218. public function getPageBlocks ()
  219. {
  220. $aFieldsUnset = array('cell_id', 'active', 'copyable', 'deletable', 'object', 'text', 'text_updated', 'title_system', 'visible_for_levels');
  221. $aCells = $this->_oQuery->getPageBlocks();
  222. foreach ($aCells as $sKey => $aCell) {
  223. foreach ($aCell as $i => $aBlock) {
  224. if (!$this->_isVisibleBlock($aBlock))
  225. unset($aCells[$sKey][$i]);
  226. $this->processPageBlock($aCells[$sKey][$i], true);
  227. $aBlock = $aCells[$sKey][$i];
  228. $sFunc = '_getBlock' . ucfirst($aBlock['type']);
  229. $aCells[$sKey][$i]['content'] = method_exists($this, $sFunc) ? $this->$sFunc($aBlock) : $aBlock['content'];
  230. $aCells[$sKey][$i]['title'] = $this->getBlockTitle($aBlock);
  231. foreach ($aFieldsUnset as $s)
  232. unset($aCells[$sKey][$i][$s]);
  233. }
  234. }
  235. return $aCells;
  236. }
  237. /**
  238. * Get page code vars
  239. * @return string
  240. */
  241. protected function _getPageCodeVars ()
  242. {
  243. $aHiddenOn = array(
  244. pow(2, BX_DB_HIDDEN_PHONE - 1) => 'bx-def-media-phone-hide',
  245. pow(2, BX_DB_HIDDEN_TABLET - 1) => 'bx-def-media-tablet-hide',
  246. pow(2, BX_DB_HIDDEN_DESKTOP - 1) => 'bx-def-media-desktop-hide',
  247. pow(2, BX_DB_HIDDEN_MOBILE - 1) => 'bx-def-mobile-app-hide'
  248. );
  249. $aVars = array (
  250. 'page_id' => 'bx-page-' . $this->_aObject['uri'],
  251. );
  252. $aBlocks = $this->_oQuery->getPageBlocks();
  253. foreach ($aBlocks as $sKey => $aCell) {
  254. $sCell = '';
  255. foreach ($aCell as $aBlock) {
  256. $this->processPageBlock($aBlock, false);
  257. $sContentWithBox = $this->_getBlockCode($aBlock);
  258. $sHiddenOn = '';
  259. if(!empty($aBlock['hidden_on']))
  260. foreach($aHiddenOn as $iHiddenOn => $sClass)
  261. if((int)$aBlock['hidden_on'] & $iHiddenOn)
  262. $sHiddenOn .= ' ' . $sClass;
  263. if ($sContentWithBox)
  264. $sCell .= '<div class="bx-page-block-container bx-def-padding-sec-topbottom' . $sHiddenOn . '" id="bx-page-block-' . $aBlock['id'] . '">' . $sContentWithBox . '</div>';
  265. }
  266. $aVars[$sKey] = $sCell;
  267. }
  268. return $aVars;
  269. }
  270. /**
  271. * Process block values, especially if someting need to be overrided
  272. */
  273. protected function processPageBlock(&$aBlock, $bApi = false)
  274. {
  275. }
  276. /**
  277. * Get page code only.
  278. * @return string
  279. */
  280. protected function _getPageCode ()
  281. {
  282. $aVars = $this->_getPageCodeVars ();
  283. return $this->_oTemplate->parseHtmlByName($this->_aObject['template'], $aVars);
  284. }
  285. /**
  286. * Get one block code only.
  287. * @return string
  288. */
  289. protected function _getBlockOnlyCode ($iBlockId)
  290. {
  291. if (!($aBlock = $this->_oQuery->getPageBlock((int)$iBlockId)))
  292. return '';
  293. return $this->_getBlockCode($aBlock);
  294. }
  295. /**
  296. * Get block code.
  297. * @return string
  298. */
  299. protected function _getBlockCode($aBlock)
  300. {
  301. $sContentWithBox = '';
  302. $oFunctions = $this->_oTemplate->getTemplateFunctions();
  303. if (isset($GLOBALS['bx_profiler'])) $GLOBALS['bx_profiler']->beginPageBlock(_t($aBlock['title']), $aBlock['id']);
  304. $sFunc = '_getBlock' . ucfirst($aBlock['type']);
  305. if ($this->_isVisibleBlock($aBlock) && method_exists($this, $sFunc)) {
  306. $mixedContent = $this->$sFunc($aBlock);
  307. $sTitle = $this->getBlockTitle($aBlock);
  308. if (is_array($mixedContent) && !empty($mixedContent['content'])) {
  309. $sContentWithBox = $oFunctions->designBoxContent(
  310. isset($mixedContent['title']) ? $mixedContent['title'] : $sTitle,
  311. $mixedContent['content'],
  312. isset($mixedContent['designbox_id']) ? $mixedContent['designbox_id'] : $aBlock['designbox_id'],
  313. isset($mixedContent['menu']) ? $mixedContent['menu'] : false
  314. );
  315. }
  316. elseif (is_string($mixedContent) && !empty($mixedContent)) {
  317. $sContentWithBox = $oFunctions->designBoxContent($sTitle, $mixedContent, $aBlock['designbox_id']);
  318. }
  319. }
  320. if (isset($GLOBALS['bx_profiler'])) $GLOBALS['bx_profiler']->endPageBlock($aBlock['id'], $sContentWithBox ? false : true, false );
  321. return $sContentWithBox;
  322. }
  323. /**
  324. * Add necessary js and css files.
  325. */
  326. protected function _addJsCss()
  327. {
  328. $this->_oTemplate->addJs('BxDolPage.js');
  329. $this->_oTemplate->addCss('page_sticky.css');
  330. $this->_oTemplate->addCss('page_layouts.css');
  331. }
  332. /**
  333. * Set system template variables, like page title, meta description, meta keywords and meta robots.
  334. */
  335. protected function _addSysTemplateVars ()
  336. {
  337. $oTemplate = BxDolTemplate::getInstance();
  338. $sPageTitle = $this->_getPageTitle();
  339. if ($sPageTitle)
  340. $oTemplate->setPageHeader ($sPageTitle);
  341. $sMetaDesc = $this->_getPageMetaDesc();
  342. if ($sMetaDesc)
  343. $oTemplate->setPageDescription ($sMetaDesc);
  344. $sMetaRobots = $this->_getPageMetaRobots();
  345. if ($sMetaRobots)
  346. $oTemplate->setPageMetaRobots ($sMetaRobots);
  347. $sMetaImage = $this->_getPageMetaImage();
  348. if ($sMetaImage)
  349. $oTemplate->addPageMetaImage($sMetaImage);
  350. $sMetaKeywords = $this->_getPageMetaKeywords();
  351. if ($sMetaKeywords)
  352. $oTemplate->addPageKeywords ($sMetaKeywords);
  353. }
  354. /**
  355. * Select menu from page properties.
  356. */
  357. protected function _selectMenu ()
  358. {
  359. BxDolMenu::setSelectedGlobal ($this->_aObject['module'], $this->_aObject['uri']);
  360. }
  361. /**
  362. * Set page submenu if it's specified
  363. */
  364. protected function _setSubmenu ($aParams)
  365. {
  366. if(empty($this->_aObject['submenu']))
  367. return;
  368. $oMenuSubmenu = BxDolMenu::getObjectInstance('sys_site_submenu');
  369. if(!$oMenuSubmenu)
  370. return;
  371. $oMenuSubmenu->setObjectSubmenu($this->_aObject['submenu'], $aParams);
  372. }
  373. /**
  374. * Get content for 'raw' block type.
  375. * @return string
  376. */
  377. protected function _getBlockRaw ($aBlock)
  378. {
  379. $s = '<div class="bx-page-raw-container">' . BxDolTemplate::getInstance()->parseHtmlByContent($aBlock['content'], array()) . '</div>';
  380. $s = $this->_replaceMarkers($s, array('block_id' => $aBlock['id']));
  381. $s = bx_process_macros($s);
  382. return $s;
  383. }
  384. /**
  385. * Get content for 'custom' block type.
  386. * @return string
  387. */
  388. protected function _getBlockCustom ($aBlock)
  389. {
  390. $s = '<div class="bx-page-custom-container">' . BxDolTemplate::getInstance()->parseHtmlByContent($aBlock['content'], array()) . '</div>';
  391. $s = $this->_replaceMarkers($s, array('block_id' => $aBlock['id']));
  392. $s = bx_process_macros($s);
  393. return $s;
  394. }
  395. /**
  396. * Get content for 'html' block type.
  397. * @return string
  398. */
  399. protected function _getBlockHtml ($aBlock)
  400. {
  401. $s = '<div class="bx-page-html-container">' . $aBlock['content'] . '</div>';
  402. $s = $this->_replaceMarkers($s, array('block_id' => $aBlock['id']));
  403. $s = bx_process_macros($s);
  404. return $s;
  405. }
  406. /**
  407. * Get content for 'wiki' block type.
  408. * @return string
  409. */
  410. protected function _getBlockWiki ($aBlock)
  411. {
  412. $oWiki = BxDolWiki::getObjectInstance($this->_aObject['module']);
  413. if (!$oWiki) {
  414. $sContent = _t('_sys_wiki_error_missing_wiki_object', $this->_aObject['module']);
  415. }
  416. else {
  417. $sContent = $oWiki->getBlockContent($aBlock['id'], false, (int)bx_get($aBlock['id'].'rev') ? (int)bx_get($aBlock['id'].'rev') : false);
  418. }
  419. $s = '<div id="bx-page-wiki-container-' . $aBlock['id'] . '" class="bx-page-wiki-container">' . $sContent . '</div>';
  420. $s = $this->_replaceMarkers($s, array('block_id' => $aBlock['id']));
  421. $s = bx_process_macros($s);
  422. return $s;
  423. }
  424. /**
  425. * Get content for 'lang' block type.
  426. * @return string
  427. */
  428. protected function _getBlockLang ($aBlock)
  429. {
  430. $s = '<div class="bx-page-lang-container">' . _t(trim($aBlock['content'])) . '</div>';
  431. $s = $this->_replaceMarkers($s, array('block_id' => $aBlock['id']));
  432. $s = bx_process_macros($s);
  433. return $s;
  434. }
  435. /**
  436. * Get content for 'image' block type.
  437. * @return string
  438. */
  439. protected function _getBlockImage ($aBlock)
  440. {
  441. if (empty($aBlock['content']))
  442. return false;
  443. list($iFileId, $sAlign ) = explode('#', $aBlock['content']);
  444. $iFileId = (int)$iFileId;
  445. if (!$iFileId)
  446. return false;
  447. $oStorage = BxDolStorage::getObjectInstance(BX_DOL_STORAGE_OBJ_IMAGES);
  448. if (!$oStorage)
  449. return false;
  450. $sUrl = $oStorage->getFileUrlById($iFileId);
  451. if (!$sUrl)
  452. return false;
  453. $sStyleAdd = '';
  454. if ('center' == $sAlign || 'left' == $sAlign || 'right' == $sAlign)
  455. $sStyleAdd = 'style="text-align:' . $sAlign . '"';
  456. return '<div class="bx-page-image-container" ' . $sStyleAdd . '><img src="' . $sUrl . '" /></div>';
  457. }
  458. /**
  459. * Get content for 'rss' block type.
  460. * @return string
  461. */
  462. protected function _getBlockRss ($aBlock)
  463. {
  464. if (empty($aBlock['content']))
  465. return false;
  466. list( $sUrl, $iNum ) = explode('#', $aBlock['content']);
  467. $iNum = (int)$iNum;
  468. return BxDolRss::getObjectInstance('sys_page_block')->getHolder($aBlock['id'], $iNum);
  469. }
  470. /**
  471. * Get content for 'menu' block type.
  472. * @return string
  473. */
  474. protected function _getBlockMenu ($aBlock)
  475. {
  476. $oMenu = BxTemplMenu::getObjectInstance($aBlock['content']);
  477. return $oMenu ? $oMenu->getCode () : '';
  478. }
  479. /**
  480. * Get content for 'service' block type.
  481. * @return string
  482. */
  483. protected function _getBlockService ($aBlock)
  484. {
  485. return BxDolService::callSerialized($aBlock['content'], $this->_aMarkers);
  486. }
  487. /**
  488. * Get page title.
  489. * @return string
  490. */
  491. protected function _getPageTitle()
  492. {
  493. return $this->_replaceMarkers(_t($this->_aObject['title']));
  494. }
  495. /**
  496. * Get page meta description.
  497. * @return string
  498. */
  499. protected function _getPageMetaDesc()
  500. {
  501. return $this->_replaceMarkers(_t($this->_aObject['meta_description']));
  502. }
  503. /**
  504. * Get page meta image.
  505. * @return string
  506. */
  507. protected function _getPageMetaImage()
  508. {
  509. return '';
  510. }
  511. /**
  512. * Get page meta keywords.
  513. * @return string
  514. */
  515. protected function _getPageMetaKeywords()
  516. {
  517. return $this->_replaceMarkers(_t($this->_aObject['meta_keywords']));
  518. }
  519. /**
  520. * Get page meta robots.
  521. * @return string
  522. */
  523. protected function _getPageMetaRobots()
  524. {
  525. return _t($this->_aObject['meta_robots']);
  526. }
  527. /**
  528. * Get access denied message HTML.
  529. * @return string
  530. */
  531. protected function _getPageAccessDeniedMsg ()
  532. {
  533. return MsgBox(_t('_Access denied'));
  534. }
  535. /**
  536. * Get page cache object.
  537. * @return cache object instance
  538. */
  539. protected function _getPageCacheObject ()
  540. {
  541. if ($this->_oPageCacheObject != null) {
  542. return $this->_oPageCacheObject;
  543. } else {
  544. $sEngine = getParam('sys_page_cache_engine');
  545. $this->_oPageCacheObject = bx_instance ('BxDolCache' . $sEngine);
  546. if (!$this->_oPageCacheObject->isAvailable())
  547. $this->_oPageCacheObject = bx_instance ('BxDolCacheFile');
  548. return $this->_oPageCacheObject;
  549. }
  550. }
  551. /**
  552. * Get page cache key.
  553. * @param $isPrefixOnly return key prefix only.
  554. * @return string
  555. */
  556. protected function _getPageCacheKey ($isPrefixOnly = false)
  557. {
  558. $s = 'page_' . $this->_aObject['object'] . '_';
  559. if ($isPrefixOnly)
  560. return $s;
  561. $s .= $this->_getPageCacheParams ();
  562. $s .= bx_site_hash() . '.php';
  563. return $s;
  564. }
  565. /**
  566. * Additional cache key. In the case of dynamic page.
  567. * For example - profile page, where each profile has own page.
  568. * @return string
  569. */
  570. protected function _getPageCacheParams ()
  571. {
  572. return '';
  573. }
  574. /**
  575. * Clean page cache.
  576. * @param $isDelAllWithPagePrefix delete cache by prefix, it can be used for dynamic pages, like profile view, where for each profile separate cache is generated.
  577. * @return string
  578. */
  579. protected function cleanCache ($isDelAllWithPagePrefix = false)
  580. {
  581. $oCache = $this->_getPageCacheObject ();
  582. $sKey = $this->_getPageCacheKey($isDelAllWithPagePrefix);
  583. if ($isDelAllWithPagePrefix)
  584. return $oCache->removeAllByPrefix($sKey);
  585. else
  586. return $oCache->delData($sKey);
  587. }
  588. }
  589. /** @} */