本文整理匯總了PHP中Thelia\Model\ConfigQuery::getConfiguredShopUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConfigQuery::getConfiguredShopUrl方法的具體用法?PHP ConfigQuery::getConfiguredShopUrl怎麽用?PHP ConfigQuery::getConfiguredShopUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Thelia\Model\ConfigQuery
的用法示例。
在下文中一共展示了ConfigQuery::getConfiguredShopUrl方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$securityContext = $httpKernel->getContainer()->get('thelia.securityContext');
// We just check the current user has the ADMIN role.
$isGranted = $securityContext->isGranted(array('ADMIN'), array(), array(), array());
if (false === $isGranted) {
echo "Sorry, it seems that you're not allowed to use this function. ADMIN role is required.";
exit;
}
//------------------------------------------------------------------------------
// DO NOT COPY THESE VARIABLES IN FOLDERS config.php FILES
//------------------------------------------------------------------------------
//**********************
//Path configuration
//**********************
// In this configuration the media folder is located in the /web directory.
// base url of site (without final /). if you prefer relative urls leave empty.
$base_url = rtrim(ConfigQuery::getConfiguredShopUrl(), '/');
// Argh, url_site is not defined ?!
if (empty($base_url)) {
// A we did not used the router to access this dialog, we cannot use the URL class. Use the good old method.
$base_url = $request->getSchemeAndHttpHost() . preg_replace('!/tinymce/filemanager/dialog.php.*$!', '', $_SERVER['REQUEST_URI']);
}
// path from base_url to base of upload folder (with start and final /)
$upload_dir = '/media/upload/';
// path from base_url to base of upload folder (with start and final /)
$thumbs_dir = '/media/thumbs/';
// path from base_url to filemanager folder (with start and final /)
$filemanager_dir = '/tinymce/filemanager/';
// path to file manager folder to upload folder (with final /)
$current_path = THELIA_WEB_DIR . DS . 'media' . DS . 'upload' . DS;
// path to file manager folder to thumbs folder (with final /)
// WARNING: thumbs folder should not be inside the upload folder