/** * @return Data */ protected function _getHelper() { return Data::getInstance(); }
/** * @param string $value * @return string */ private function _cmsExtendedId($id) { $cms = Data::getInstance()->getCmsModel(); $cms->load($id); if ($cms->getId()) { $store = \Mage::getModel('core/store')->load($cms->getStoreId()); if (NULL === ($storeId = $store->getId())) { throw new \Exception('Unable to create extended id for cms page.' . " Page with id '{$id}' has invalid store id: '{$storeId}'"); } $parser = Parser::getInstance(); $storeExtId = $parser->createExtendedId('store', 'code', 'id', $store->getCode()); return sprintf('cms:identifier/%s,store_id/(%s)#page_id', rawurlencode($cms->getIdentifier()), $storeExtId); } throw new \Exception('Unable to create extended id for cms page.' . " Page with id '{$id}' not found"); }