本文整理汇总了PHP中AO::getBaseUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP AO::getBaseUrl方法的具体用法?PHP AO::getBaseUrl怎么用?PHP AO::getBaseUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AO
的用法示例。
在下文中一共展示了AO::getBaseUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareLayout
protected function _prepareLayout()
{
if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
$breadcrumbs->addCrumb('home', array('label' => AO::helper('catalogsearch')->__('Home'), 'title' => AO::helper('catalogsearch')->__('Go to Home Page'), 'link' => AO::getBaseUrl()))->addCrumb('search', array('label' => AO::helper('catalogsearch')->__('Catalog Advanced Search'), 'link' => $this->getUrl('*/*/')))->addCrumb('search_result', array('label' => AO::helper('catalogsearch')->__('Results')));
}
return parent::_prepareLayout();
}
示例2: getUrl
public function getUrl($params = array())
{
static $reservedKeys = array('module' => 1, 'controller' => 1, 'action' => 1, 'array' => 1);
if (is_string($params)) {
$paramsArr = explode('/', $params);
$params = array('controller' => $paramsArr[0], 'action' => $paramsArr[1]);
}
$url = AO::getBaseUrl($params);
if (!empty($params['frontName'])) {
$url .= $params['frontName'] . '/';
} else {
$url .= $this->_config->getName() . '/';
}
if (!empty($params)) {
$paramsStr = '';
foreach ($params as $key => $value) {
if (!isset($reservedKeys[$key]) && '_' !== $key[0] && !empty($value)) {
$paramsStr .= $key . '/' . $value . '/';
}
}
if (empty($params['controller']) && !empty($paramsStr)) {
$params['controller'] = 'index';
}
$url .= empty($params['controller']) ? '' : $params['controller'] . '/';
if (empty($params['action']) && !empty($paramsStr)) {
$params['action'] = 'index';
}
$url .= empty($params['action']) ? '' : $params['action'] . '/';
$url .= $paramsStr;
$url .= empty($params['array']) ? '' : '?' . http_build_query($params['array']);
}
return $url;
}
示例3: _getUrl
protected function _getUrl()
{
$url = false;
if ($this->getValue()) {
$url = AO::getBaseUrl('media') . 'catalog/product/' . $this->getValue();
}
return $url;
}
示例4: getUrl
public function getUrl($object)
{
$url = false;
if ($image = $object->getData($this->getAttribute()->getAttributeCode())) {
$url = AO::getBaseUrl('media') . 'catalog/product/' . $image;
}
return $url;
}
示例5: _checkIfInstalled
/**
* Checking installation status
*
* @return unknown
*/
protected function _checkIfInstalled()
{
if ($this->_getInstaller()->isApplicationInstalled()) {
$this->getResponse()->setRedirect(AO::getBaseUrl())->sendResponse();
exit;
}
return true;
}
示例6: setSrc
function setSrc($src, $type = null)
{
$type = (string) $type;
if (empty($type)) {
$type = 'js';
}
$url = AO::getBaseUrl($type) . $src;
return $this->setTagParam('src', $url);
}
示例7: render
/**
* Prepare link to display in grid
*
* @param Varien_Object $row
* @return string
*/
public function render(Varien_Object $row)
{
$fileName = preg_replace('/^\\//', '', $row->getSitemapPath() . $row->getSitemapFilename());
$url = $this->htmlEscape(AO::getBaseUrl('web') . $fileName);
if (file_exists(BP . DS . $fileName)) {
return sprintf('<a href="%1$s">%1$s</a>', $url);
}
return $url;
}
示例8: setHref
function setHref($href, $type = null)
{
$type = (string) $type;
if (empty($type)) {
$type = 'skin';
}
$url = AO::getBaseUrl($type) . $href;
return $this->setTagParam('href', $url);
}
示例9: getGlobalConfig
public function getGlobalConfig()
{
$dom = new DOMDocument();
$dom->load(AO::getModuleDir('etc', 'Mage_Reports') . DS . 'flexConfig.xml');
$baseUrl = $dom->createElement('baseUrl');
$baseUrl->nodeValue = AO::getBaseUrl();
$dom->documentElement->appendChild($baseUrl);
return $dom->saveXML();
}
示例10: switchAction
public function switchAction()
{
if ($curency = (string) $this->getRequest()->getParam('currency')) {
AO::app()->getStore()->setCurrentCurrencyCode($curency);
}
if (AO::getSingleton('checkout/session')->getQuote()) {
AO::getSingleton('checkout/session')->getQuote()->collectTotals()->save();
}
$this->_redirectReferer(AO::getBaseUrl());
}
示例11: indexAction
public function indexAction()
{
$url = AO::getBaseUrl('web') . 'downloader/?return=' . urlencode(AO::getUrl('adminhtml'));
$this->getResponse()->setRedirect($url);
return;
$this->loadLayout();
$this->_setActiveMenu('system/extensions/local');
$this->_addContent($this->getLayout()->createBlock('adminhtml/extensions_local'));
$this->renderLayout();
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->_urls = array('base' => AO::getBaseUrl('web'), 'baseSecure' => AO::getBaseUrl('web', true), 'current' => $this->getRequest()->getRequestUri());
$action = AO::app()->getFrontController()->getAction();
if ($action) {
$this->addBodyClass($action->getFullActionName('-'));
}
$this->_beforeCacheUrl();
}
示例13: _prepareLayout
/**
* Prepare layout
*
* @return Mage_CatalogSearch_Block_Result
*/
protected function _prepareLayout()
{
$title = $this->__("Search results for: '%s'", $this->helper('catalogSearch')->getEscapedQueryText());
// add Home breadcrumb
if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
$breadcrumbs->addCrumb('home', array('label' => $this->__('Home'), 'title' => $this->__('Go to Home Page'), 'link' => AO::getBaseUrl()))->addCrumb('search', array('label' => $title, 'title' => $title));
}
$this->getLayout()->getBlock('head')->setTitle($title);
return parent::_prepareLayout();
}
示例14: _prepareLayout
public function _prepareLayout()
{
if ($headBlock = $this->getLayout()->getBlock('head')) {
$headBlock->setTitle(AO::helper('catalogsearch')->__('Catalog Advanced Search'));
}
// add Home breadcrumb
if ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) {
$breadcrumbs->addCrumb('home', array('label' => AO::helper('catalogsearch')->__('Home'), 'title' => AO::helper('catalogsearch')->__('Go to Home Page'), 'link' => AO::getBaseUrl()))->addCrumb('search', array('label' => AO::helper('catalogsearch')->__('Catalog Advanced Search')));
}
return parent::_prepareLayout();
}
示例15: _getUrl
/**
* Get image preview url
*
* @return string
*/
protected function _getUrl()
{
$url = parent::_getUrl();
$config = $this->getFieldConfig();
/* @var $config Varien_Simplexml_Element */
if (!empty($config->base_url)) {
$el = $config->descend('base_url');
$urlType = empty($el['type']) ? 'link' : (string) $el['type'];
$url = AO::getBaseUrl($urlType) . (string) $config->base_url . '/' . $url;
}
return $url;
}