本文整理汇总了PHP中Gekosale\App::getURLForAssetDirectory方法的典型用法代码示例。如果您正苦于以下问题:PHP App::getURLForAssetDirectory方法的具体用法?PHP App::getURLForAssetDirectory怎么用?PHP App::getURLForAssetDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gekosale\App
的用法示例。
在下文中一共展示了App::getURLForAssetDirectory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMainInfo
public function getMainInfo()
{
$this->xmlParser = new XmlParser();
$pageschemes = App::getModel('pagescheme')->getPageschemeAll();
$dirs = array();
foreach ($pageschemes as $pagescheme) {
$this->xmlParser->parseFast(ROOTPATH . 'themes/' . $pagescheme['templatefolder'] . '/info/info.xml');
$info = $this->xmlParser->getValue('template', true);
$dirs[] = array('name' => $pagescheme['name'], 'id' => $pagescheme['id'], 'info' => $info, 'templatefolder' => $pagescheme['templatefolder'], 'path' => App::getURLForAssetDirectory() . $pagescheme['templatefolder'], 'active' => $this->registry->loader->getParam('pageschemeid') == $pagescheme['id'] ? 1 : 0);
}
return $dirs;
}
示例2: setStaticTemplateVariables
public function setStaticTemplateVariables()
{
if ($this->registry->router->getAdministrativeMode() == 0) {
$link = $this->_adminPane = '';
} else {
$link = $this->_adminPane = __ADMINPANE__ . '/';
}
$languageModel = App::getModel('language');
$languages = $languageModel->getLanguages();
$this->layer = $this->registry->loader->getCurrentLayer();
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
$this->assign('SSLNAME', 'https://');
} else {
$this->assign('SSLNAME', 'http://');
}
$theme = App::getRegistry()->loader->getParam('theme');
$this->assign('URL', App::getURLAdress() . $link);
$this->assign('CURRENT_URL', App::getCurrentURLAdress());
$this->assign('DESIGNPATH', DESIGNPATH);
$this->assign('ASSETSPATH', App::getURLForAssetDirectory() . $theme . '/assets/');
$this->assign('THEMESPATH', App::getURLForAssetDirectory());
$this->assign('CURRENT_CONTROLLER', $this->registry->router->getCurrentController());
$this->assign('CURRENT_ACTION', $this->registry->router->getAction());
$this->assign('CURRENT_PARAM', $this->registry->core->getParam());
$this->assign('SHOP_NAME', Session::getActiveShopName());
$templateData = array();
if ($this->registry->router->getAdministrativeMode() == 0) {
$cartModel = App::getModel('cart');
$client = App::getModel('client')->getClient();
$productCart = $cartModel->getShortCartList();
$productCart = $cartModel->getProductCartPhotos($productCart);
$this->assign('SHOP_LOGO', $this->layer['photoid']);
$this->assign('FAVICON', $this->layer['favicon']);
$this->assign('enableregistration', $this->layer['enableregistration']);
$this->assign('client', $client);
$this->assign('clientdata', $client);
$this->assign('showtax', $this->layer['showtax']);
$this->assign('currencySymbol', Session::getActiveCurrencySymbol());
$this->assign('count', $cartModel->getProductAllCount());
$this->assign('globalPrice', $cartModel->getGlobalPrice());
$this->assign('productCart', $productCart);
$this->assign('language', Session::getActiveLanguageId());
$this->assign('languageCode', Session::getActiveLanguage());
$this->assign('languageFlag', $languageModel->getLanguages());
$this->assign('currencies', $languageModel->getAllCurrenciesForView());
$this->assign('breadcrumb', App::getModel('breadcrumb')->getPageLinks());
$this->assign('contentcategory', App::getModel('staticcontent')->getContentCategoriesTree());
$this->assign('defaultcontact', App::getModel('contact')->getContactById($this->layer['contactid']));
$this->assign('newsletterButton', App::getModel('newsletter')->isNewsletterButton());
$this->assign('cartpreview', $cartModel->getCartPreviewTemplate());
if ($this->layer['cartredirect'] != '') {
$this->assign('cartredirect', App::getURLAdress() . Seo::getSeo($this->layer['cartredirect']));
} else {
$this->assign('cartredirect', '');
}
$this->assign('modulesettings', $this->registry->core->getModuleSettingsForView());
$message = Session::getVolatileMessage();
if (isset($message) && !empty($message)) {
$this->assign('message', $message[0]);
}
$this->assign('categories', App::getModel('CategoriesBox')->getCategoriesTree(2));
$methods = $this->getXajaxMethodsForFrontend();
foreach ($methods as $xajaxMethodName => $xajaxMethodParams) {
$this->registry->xajax->registerFunction(array($xajaxMethodName, App::getModel($xajaxMethodParams['model']), $xajaxMethodParams['method']));
}
$message = Session::getVolatileMessage();
if (isset($message) && !empty($message)) {
$this->assign('message', $message[0]);
}
$this->assign('view', Helper::getViewId());
$this->assign('viewid', Helper::getViewId());
} else {
$this->registry->core->setAdminStoreConfig();
$templateData = array('user_name' => App::getModel('users')->getUserFullName(), 'user_id' => App::getModel('users')->getActiveUserid(), 'language' => Session::getActiveLanguageId(), 'languages' => json_encode($languages), 'globalsettings' => Session::getActiveGlobalSettings(), 'views' => App::getModel('view')->getViews(), 'vatvalues' => json_encode(App::getModel('vat/vat')->getVATValuesAll()), 'FRONTEND_URL' => Session::getActiveShopUrl() != '' ? 'http://' . Session::getActiveShopUrl() : App::getURLAdress(), 'appversion' => Session::getActiveAppVersion(), 'view' => Helper::getViewId(), 'viewid' => Helper::getViewId());
$message = Session::getVolatileMessage();
if (isset($message) && !empty($message)) {
$templateData['message'] = $message[0];
}
$methods = $this->getXajaxMethodsForAdmin();
foreach ($methods as $xajaxMethodName => $xajaxMethodParams) {
$this->registry->xajax->registerFunction(array($xajaxMethodName, App::getModel($xajaxMethodParams['model']), $xajaxMethodParams['method']));
}
$Data = Event::dispatch($this, 'template.setStaticTemplateVariables', array('data' => $templateData));
foreach ($Data as $param => $value) {
$this->assign($param, $value);
}
$this->assign('view', Helper::getViewId());
$this->assign('viewid', Helper::getViewId());
}
}