本文整理汇总了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