当前位置: 首页>>代码示例>>PHP>>正文


PHP AO::getBaseUrl方法代码示例

本文整理汇总了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();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:7,代码来源:Advanced_Result.php

示例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;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:33,代码来源:Router.php

示例3: _getUrl

 protected function _getUrl()
 {
     $url = false;
     if ($this->getValue()) {
         $url = AO::getBaseUrl('media') . 'catalog/product/' . $this->getValue();
     }
     return $url;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:8,代码来源:Catalog_Product_Helper_Form_Image.php

示例4: getUrl

 public function getUrl($object)
 {
     $url = false;
     if ($image = $object->getData($this->getAttribute()->getAttributeCode())) {
         $url = AO::getBaseUrl('media') . 'catalog/product/' . $image;
     }
     return $url;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:8,代码来源:Resource_Eav_Mysql4_Product_Attribute_Frontend_Image.php

示例5: _checkIfInstalled

 /**
  * Checking installation status
  *
  * @return unknown
  */
 protected function _checkIfInstalled()
 {
     if ($this->_getInstaller()->isApplicationInstalled()) {
         $this->getResponse()->setRedirect(AO::getBaseUrl())->sendResponse();
         exit;
     }
     return true;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:13,代码来源:WizardController.php

示例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);
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:9,代码来源:Text_Tag_Js.php

示例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;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:15,代码来源:Sitemap_Grid_Renderer_Link.php

示例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);
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:9,代码来源:Text_Tag_Css.php

示例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();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:9,代码来源:Config.php

示例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());
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:10,代码来源:CurrencyController.php

示例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();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:10,代码来源:LocalController.php

示例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();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:10,代码来源:Html.php

示例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();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:15,代码来源:Result.php

示例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();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:11,代码来源:Advanced_Form.php

示例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;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:17,代码来源:System_Config_Form_Field_Image.php


注:本文中的AO::getBaseUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。