예제 #1
0
파일: XLite.php 프로젝트: kewaunited/xcart
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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);
 }
예제 #3
0
파일: Main.php 프로젝트: kewaunited/xcart
 /**
  * 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);
 }
예제 #4
0
 /**
  * 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)) . '/');
 }
예제 #5
0
 /**
  * Get Store URL
  *
  * @return string
  */
 protected function getStoreURL()
 {
     return \XLite\Core\URLManager::getShopURL(\XLite\Core\Converter::buildURL());
 }
예제 #6
0
 /**
  * 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;
 }
예제 #7
0
 /**
  * Get URL to test https connection
  *
  * @return string
  */
 protected function getTestURL()
 {
     return \XLite\Core\URLManager::getShopURL(static::CHECK_URI_SUFFIX, true);
 }
예제 #8
0
 /**
  * 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);
 }
예제 #9
0
 /**
  * Get store url without script part
  *
  * @return string
  */
 protected function getShopUrl()
 {
     $shopUrl = URLManager::getShopURL(Converter::buildURL());
     $shopUrl = preg_replace('/[^\\/]*.php$/', '', $shopUrl);
     return $shopUrl;
 }