/** * Return full URL for the resource * * @param string $url Url part to add OPTIONAL * @param boolean $isSecure Use HTTP or HTTPS OPTIONAL * @param array $params Optional URL params OPTIONAL * * @return string */ public function getShopURL($url = '', $isSecure = null, array $params = array()) { return \XLite\Core\URLManager::getShopURL($url, $isSecure, $params); }
/** * Get the secure full URL of the page * Example: getSecureShopURL('cart.php') = "https://domain/dir/cart.php * * @param string $url Relative URL OPTIONAL * @param array $params Optional URL params OPTIONAL * * @return string */ public function getSecureShopURL($url = '', array $params = array()) { return \XLite\Core\URLManager::getShopURL($url, true, $params, null, false); }
/** * Get logo * * @return string */ public static function getSignUpLogo() { $logo = \XLite\Core\Layout::getInstance()->getResourceWebPath('modules/CDev/Paypal/signup_logo.png', \XLite\Core\Layout::WEB_PATH_OUTPUT_URL, \XLite::ADMIN_INTERFACE); return \XLite\Core\URLManager::getShopURL($logo, true, array(), \XLite\Core\URLManager::URL_OUTPUT_FULL, false); }
/** * Return structure of configuration for JS TinyMCE library * * @return array */ protected function getTinyMCEConfiguration() { $layout = \XLite\Core\Layout::getInstance(); $themeFiles = $this->getThemeFiles(false); $themeFiles = $themeFiles[static::RESOURCE_CSS]; $themeFilesCSS = array(); foreach ($themeFiles as $key => $file) { if (!is_array($file)) { $path = $layout->getResourceWebPath($file, \XLite\Core\Layout::WEB_PATH_OUTPUT_URL, \XLite::CUSTOMER_INTERFACE); if ($path) { $themeFilesCSS[] = $this->getShopURL($path, null, array('t' => LC_START_TIME)); } } } $contentCSS = implode(',', $themeFilesCSS); // Base is the web path to the tinymce library directory return array('contentCSS' => $contentCSS, 'shopURL' => \XLite\Core\URLManager::getShopURL(null, \XLite\Core\Request::getInstance()->isHTTPS(), array(), null, false), 'shopURLRoot' => \XLite\Model\Category::WEB_LC_ROOT, 'bodyClass' => $this->getParam(static::PARAM_STYLE), 'base' => dirname(\XLite\Singletons::$handler->layout->getResourceWebPath($this->getDir() . '/js/tinymce/tiny_mce.js', \XLite\Core\Layout::WEB_PATH_OUTPUT_URL)) . '/'); }
/** * Get Store URL * * @return string */ protected function getStoreURL() { return \XLite\Core\URLManager::getShopURL(\XLite\Core\Converter::buildURL()); }
/** * Common data for all request types * * @return array */ protected function getRequestCommonData() { $data = array(static::FIELD_VERSION_API => static::MP_API_VERSION, static::FIELD_SHOP_ID => $this->generateShopID(), static::FIELD_SHOP_DOMAIN => \Includes\Utils\ConfigParser::getOptions(array('host_details', 'http_host')), static::FIELD_SHOP_URL => \XLite\Core\URLManager::getShopURL(), static::FIELD_VERSION_CORE_CURRENT => $this->getVersionField(\XLite::getInstance()->getMajorVersion(), \XLite::getInstance()->getMinorVersion()), static::FIELD_XCN_LICENSE_KEY => \XLite::getXCNLicenseKey(), static::FIELD_INSTALLATION_LNG => \XLite::getInstallationLng()); return $data; }
/** * Get URL to test https connection * * @return string */ protected function getTestURL() { return \XLite\Core\URLManager::getShopURL(static::CHECK_URI_SUFFIX, true); }
/** * Register URLs that should be given instead of tags * * @return array */ protected function getWebPreprocessingURL() { // Get URL of shop. If the HTTPS is used then it should be cleaned from ?xid=<xid> construction $url = \XLite\Core\URLManager::getShopURL(null, \XLite\Core\Request::getInstance()->isHTTPS(), array(), null, false); // We are cleaning URL from unnecessary here <xid> construction $url = preg_replace('/(\\?.*)/', '', $url); return array($url); }
/** * Get store url without script part * * @return string */ protected function getShopUrl() { $shopUrl = URLManager::getShopURL(Converter::buildURL()); $shopUrl = preg_replace('/[^\\/]*.php$/', '', $shopUrl); return $shopUrl; }