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


PHP Iface::url方法代码示例

本文整理汇总了PHP中Aimeos\MW\View\Iface::url方法的典型用法代码示例。如果您正苦于以下问题:PHP Iface::url方法的具体用法?PHP Iface::url怎么用?PHP Iface::url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Aimeos\MW\View\Iface的用法示例。


在下文中一共展示了Iface::url方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setViewParams

 /**
  * Sets the necessary parameter values in the view.
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
  * @param array &$tags Result array for the list of tags that are associated to the output
  * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
  * @return \Aimeos\MW\View\Iface Modified view object
  */
 protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
 {
     if (!isset($this->cache)) {
         $products = array();
         $context = $this->getContext();
         $config = $context->getConfig();
         if (isset($view->listCurrentCatItem)) {
             /** client/html/catalog/lists/promo/size
              * The maximum number of products that should be shown in the promotion section
              *
              * Each product list can render a list of promoted products on
              * top if there are any products associated to that category whose
              * list type is "promotion". This option limits the maximum number
              * of products that are displayed. It takes only effect if more
              * promotional products are added to this category than the set
              * value.
              *
              * @param integer Number of promotion products
              * @since 2014.03
              * @category User
              * @category Developer
              */
             $size = $config->get('client/html/catalog/lists/promo/size', 6);
             $domains = $config->get('client/html/catalog/lists/domains', array('media', 'price', 'text'));
             $total = null;
             $catId = $view->listCurrentCatItem->getId();
             $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
             $filter = $controller->createIndexFilterCategory($catId, 'relevance', '+', 0, $size, 'promotion');
             $products = $controller->getIndexItems($filter, $domains, $total);
         }
         if (!empty($products) && $config->get('client/html/catalog/lists/stock/enable', true) === true) {
             $stockTarget = $config->get('client/html/catalog/stock/url/target');
             $stockController = $config->get('client/html/catalog/stock/url/controller', 'catalog');
             $stockAction = $config->get('client/html/catalog/stock/url/action', 'stock');
             $stockConfig = $config->get('client/html/catalog/stock/url/config', array());
             $productIds = array_keys($products);
             sort($productIds);
             $params = array('s_prodid' => implode(' ', $productIds));
             $view->promoStockUrl = $view->url($stockTarget, $stockController, $stockAction, $params, array(), $stockConfig);
         }
         $this->addMetaItem($products, 'product', $this->expire, $this->tags);
         $this->addMetaList(array_keys($products), 'product', $this->expire);
         $view->promoItems = $products;
         $this->cache = $view;
     }
     $expire = $this->expires($this->expire, $expire);
     $tags = array_merge($tags, $this->tags);
     return $this->cache;
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:57,代码来源:Standard.php

示例2: setViewParams

 /**
  * Sets the necessary parameter values in the view.
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
  * @param array &$tags Result array for the list of tags that are associated to the output
  * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
  * @return \Aimeos\MW\View\Iface Modified view object
  */
 protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
 {
     if (!isset($this->cache)) {
         $context = $this->getContext();
         $basketCntl = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket');
         $view->standardBasket = $basketCntl->get();
         $bTarget = $view->config('client/html/basket/standard/url/target');
         $bCntl = $view->config('client/html/basket/standard/url/controller', 'basket');
         $bAction = $view->config('client/html/basket/standard/url/action', 'index');
         $bConfig = $view->config('client/html/basket/standard/url/config', array());
         /** client/html/checkout/standard/url/target
          * Destination of the URL where the controller specified in the URL is known
          *
          * The destination can be a page ID like in a content management system or the
          * module of a software development framework. This "target" must contain or know
          * the controller that should be called by the generated URL.
          *
          * @param string Destination of the URL
          * @since 2014.03
          * @category Developer
          * @see client/html/checkout/standard/url/controller
          * @see client/html/checkout/standard/url/action
          * @see client/html/checkout/standard/url/config
          */
         $cTarget = $view->config('client/html/checkout/standard/url/target');
         /** client/html/checkout/standard/url/controller
          * Name of the controller whose action should be called
          *
          * In Model-View-Controller (MVC) applications, the controller contains the methods
          * that create parts of the output displayed in the generated HTML page. Controller
          * names are usually alpha-numeric.
          *
          * @param string Name of the controller
          * @since 2014.03
          * @category Developer
          * @see client/html/checkout/standard/url/target
          * @see client/html/checkout/standard/url/action
          * @see client/html/checkout/standard/url/config
          */
         $cCntl = $view->config('client/html/checkout/standard/url/controller', 'checkout');
         /** client/html/checkout/standard/url/action
          * Name of the action that should create the output
          *
          * In Model-View-Controller (MVC) applications, actions are the methods of a
          * controller that create parts of the output displayed in the generated HTML page.
          * Action names are usually alpha-numeric.
          *
          * @param string Name of the action
          * @since 2014.03
          * @category Developer
          * @see client/html/checkout/standard/url/target
          * @see client/html/checkout/standard/url/controller
          * @see client/html/checkout/standard/url/config
          */
         $cAction = $view->config('client/html/checkout/standard/url/action', 'index');
         /** client/html/checkout/standard/url/config
          * Associative list of configuration options used for generating the URL
          *
          * You can specify additional options as key/value pairs used when generating
          * the URLs, like
          *
          *  client/html/<clientname>/url/config = array( 'absoluteUri' => true )
          *
          * The available key/value pairs depend on the application that embeds the e-commerce
          * framework. This is because the infrastructure of the application is used for
          * generating the URLs. The full list of available config options is referenced
          * in the "see also" section of this page.
          *
          * @param string Associative list of configuration options
          * @since 2014.03
          * @category Developer
          * @see client/html/checkout/standard/url/target
          * @see client/html/checkout/standard/url/controller
          * @see client/html/checkout/standard/url/action
          * @see client/html/url/config
          */
         $cConfig = $view->config('client/html/checkout/standard/url/config', array());
         /** client/html/checkout/standard/url/step-active
          * Name of the checkout process step to jump to if no previous step requires attention
          *
          * The checkout process consists of several steps which are usually
          * displayed one by another to the customer. If the data of a step
          * is already available, then that step is skipped. The active step
          * is the one that is displayed if all other steps are skipped.
          *
          * If one of the previous steps misses some data the customer has
          * to enter, then this step is displayed first. After providing
          * the missing data, the whole series of steps are tested again
          * and if no other step requests attention, the configured active
          * step will be displayed.
          *
          * The order of the steps is determined by the order of sub-parts
//.........这里部分代码省略.........
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:101,代码来源:Standard.php

示例3: getUrlUpdate

 /**
  * Returns the URL to the update page.
  *
  * @param \Aimeos\MW\View\Iface $view View object
  * @param array $params Parameters that should be part of the URL
  * @param array $config Default URL configuration
  * @return string URL string
  */
 protected function getUrlUpdate(\Aimeos\MW\View\Iface $view, array $params, array $config)
 {
     /** client/html/checkout/update/url/target
      * Destination of the URL where the controller specified in the URL is known
      *
      * The destination can be a page ID like in a content management system or the
      * module of a software development framework. This "target" must contain or know
      * the controller that should be called by the generated URL.
      *
      * @param string Destination of the URL
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/update/url/controller
      * @see client/html/checkout/update/url/action
      * @see client/html/checkout/update/url/config
      */
     $target = $view->config('client/html/checkout/update/url/target');
     /** client/html/checkout/update/url/controller
      * Name of the controller whose action should be called
      *
      * In Model-View-Controller (MVC) applications, the controller contains the methods
      * that create parts of the output displayed in the generated HTML page. Controller
      * names are usually alpha-numeric.
      *
      * @param string Name of the controller
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/update/url/target
      * @see client/html/checkout/update/url/action
      * @see client/html/checkout/update/url/config
      */
     $cntl = $view->config('client/html/checkout/update/url/controller', 'checkout');
     /** client/html/checkout/update/url/action
      * Name of the action that should create the output
      *
      * In Model-View-Controller (MVC) applications, actions are the methods of a
      * controller that create parts of the output displayed in the generated HTML page.
      * Action names are usually alpha-numeric.
      *
      * @param string Name of the action
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/update/url/target
      * @see client/html/checkout/update/url/controller
      * @see client/html/checkout/update/url/config
      */
     $action = $view->config('client/html/checkout/update/url/action', 'update');
     /** client/html/checkout/update/url/config
      * Associative list of configuration options used for generating the URL
      *
      * You can specify additional options as key/value pairs used when generating
      * the URLs, like
      *
      *  client/html/<clientname>/url/config = array( 'absoluteUri' => true )
      *
      * The available key/value pairs depend on the application that embeds the e-commerce
      * framework. This is because the infrastructure of the application is used for
      * generating the URLs. The full list of available config options is referenced
      * in the "see also" section of this page.
      *
      * @param string Associative list of configuration options
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/update/url/target
      * @see client/html/checkout/update/url/controller
      * @see client/html/checkout/update/url/action
      * @see client/html/url/config
      */
     $config = $view->config('client/html/checkout/update/url/config', $config);
     return $view->url($target, $cntl, $action, $params, array(), $config);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:79,代码来源:Standard.php

示例4: getStockUrl

 /**
  * Returns the URL to fetch the stock level details of the given products
  *
  * @param \Aimeos\MW\View\Iface $view View object
  * @param array $productIds List of product IDs
  * @return string Generated stock level URL
  */
 protected function getStockUrl(\Aimeos\MW\View\Iface $view, array $productIds)
 {
     $stockTarget = $view->config('client/html/catalog/stock/url/target');
     $stockController = $view->config('client/html/catalog/stock/url/controller', 'catalog');
     $stockAction = $view->config('client/html/catalog/stock/url/action', 'stock');
     $stockConfig = $view->config('client/html/catalog/stock/url/config', array());
     sort($productIds);
     $params = array('s_prodid' => implode(' ', $productIds));
     return $view->url($stockTarget, $stockController, $stockAction, $params, array(), $stockConfig);
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:17,代码来源:Standard.php

示例5: setViewParams

 /**
  * Sets the necessary parameter values in the view.
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
  * @param array &$tags Result array for the list of tags that are associated to the output
  * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
  * @return \Aimeos\MW\View\Iface Modified view object
  */
 protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
 {
     if (!isset($this->cache)) {
         $config = $this->getContext()->getConfig();
         /** client/html/catalog/count/enable
          * Enables or disables displaying product counts in the catalog filter
          *
          * This configuration option allows shop owners to display product
          * counts in the catalog filter or to disable fetching product count
          * information.
          *
          * The product count information is fetched via AJAX and inserted via
          * Javascript. This allows to cache parts of the catalog filter by
          * leaving out such highly dynamic content like product count which
          * changes with used filter parameter.
          *
          * @param boolean Value of "1" to display product counts, "0" to disable them
          * @since 2014.03
          * @category User
          * @category Developer
          * @see client/html/catalog/count/url/target
          * @see client/html/catalog/count/url/controller
          * @see client/html/catalog/count/url/action
          * @see client/html/catalog/count/url/config
          */
         if ($config->get('client/html/catalog/count/enable', true) == true) {
             /** client/html/catalog/count/url/target
              * Destination of the URL where the controller specified in the URL is known
              *
              * The destination can be a page ID like in a content management system or the
              * module of a software development framework. This "target" must contain or know
              * the controller that should be called by the generated URL.
              *
              * @param string Destination of the URL
              * @since 2014.03
              * @category Developer
              * @see client/html/catalog/count/url/controller
              * @see client/html/catalog/count/url/action
              * @see client/html/catalog/count/url/config
              */
             $target = $config->get('client/html/catalog/count/url/target');
             /** client/html/catalog/count/url/controller
              * Name of the controller whose action should be called
              *
              * In Model-View-Controller (MVC) applications, the controller contains the methods
              * that create parts of the output displayed in the generated HTML page. Controller
              * names are usually alpha-numeric.
              *
              * @param string Name of the controller
              * @since 2014.03
              * @category Developer
              * @see client/html/catalog/count/url/target
              * @see client/html/catalog/count/url/action
              * @see client/html/catalog/count/url/config
              */
             $controller = $config->get('client/html/catalog/count/url/controller', 'catalog');
             /** client/html/catalog/count/url/action
              * Name of the action that should create the output
              *
              * In Model-View-Controller (MVC) applications, actions are the methods of a
              * controller that create parts of the output displayed in the generated HTML page.
              * Action names are usually alpha-numeric.
              *
              * @param string Name of the action
              * @since 2014.03
              * @category Developer
              * @see client/html/catalog/count/url/target
              * @see client/html/catalog/count/url/controller
              * @see client/html/catalog/count/url/config
              */
             $action = $config->get('client/html/catalog/count/url/action', 'count');
             /** client/html/catalog/count/url/config
              * Associative list of configuration options used for generating the URL
              *
              * You can specify additional options as key/value pairs used when generating
              * the URLs, like
              *
              *  client/html/<clientname>/url/config = array( 'absoluteUri' => true )
              *
              * The available key/value pairs depend on the application that embeds the e-commerce
              * framework. This is because the infrastructure of the application is used for
              * generating the URLs. The full list of available config options is referenced
              * in the "see also" section of this page.
              *
              * @param string Associative list of configuration options
              * @since 2014.03
              * @category Developer
              * @see client/html/catalog/count/url/target
              * @see client/html/catalog/count/url/controller
              * @see client/html/catalog/count/url/action
              * @see client/html/url/config
              */
//.........这里部分代码省略.........
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:101,代码来源:Standard.php

示例6: addNavigationUrls

 /**
  * Adds the "back" and "next" URLs to the view
  *
  * @param \Aimeos\MW\View\Iface $view View object
  * @param array $steps List of checkout step names
  * @param unknown $activeStep Name of the active step
  * @return \Aimeos\MW\View\Iface Enhanced view object
  * @since 2016.05
  */
 protected function addNavigationUrls(\Aimeos\MW\View\Iface $view, array $steps, $activeStep)
 {
     /** client/html/checkout/standard/url/target
      * Destination of the URL where the controller specified in the URL is known
      *
      * The destination can be a page ID like in a content management system or the
      * module of a software development framework. This "target" must contain or know
      * the controller that should be called by the generated URL.
      *
      * @param string Destination of the URL
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/standard/url/controller
      * @see client/html/checkout/standard/url/action
      * @see client/html/checkout/standard/url/config
      */
     $cTarget = $view->config('client/html/checkout/standard/url/target');
     /** client/html/checkout/standard/url/controller
      * Name of the controller whose action should be called
      *
      * In Model-View-Controller (MVC) applications, the controller contains the methods
      * that create parts of the output displayed in the generated HTML page. Controller
      * names are usually alpha-numeric.
      *
      * @param string Name of the controller
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/standard/url/target
      * @see client/html/checkout/standard/url/action
      * @see client/html/checkout/standard/url/config
      */
     $cCntl = $view->config('client/html/checkout/standard/url/controller', 'checkout');
     /** client/html/checkout/standard/url/action
      * Name of the action that should create the output
      *
      * In Model-View-Controller (MVC) applications, actions are the methods of a
      * controller that create parts of the output displayed in the generated HTML page.
      * Action names are usually alpha-numeric.
      *
      * @param string Name of the action
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/standard/url/target
      * @see client/html/checkout/standard/url/controller
      * @see client/html/checkout/standard/url/config
      */
     $cAction = $view->config('client/html/checkout/standard/url/action', 'index');
     /** client/html/checkout/standard/url/config
      * Associative list of configuration options used for generating the URL
      *
      * You can specify additional options as key/value pairs used when generating
      * the URLs, like
      *
      *  client/html/<clientname>/url/config = array( 'absoluteUri' => true )
      *
      * The available key/value pairs depend on the application that embeds the e-commerce
      * framework. This is because the infrastructure of the application is used for
      * generating the URLs. The full list of available config options is referenced
      * in the "see also" section of this page.
      *
      * @param string Associative list of configuration options
      * @since 2014.03
      * @category Developer
      * @see client/html/checkout/standard/url/target
      * @see client/html/checkout/standard/url/controller
      * @see client/html/checkout/standard/url/action
      * @see client/html/url/config
      */
     $cConfig = $view->config('client/html/checkout/standard/url/config', array());
     $bTarget = $view->config('client/html/basket/standard/url/target');
     $bCntl = $view->config('client/html/basket/standard/url/controller', 'basket');
     $bAction = $view->config('client/html/basket/standard/url/action', 'index');
     $bConfig = $view->config('client/html/basket/standard/url/config', array());
     $step = null;
     do {
         $lastStep = $step;
     } while (($step = array_shift($steps)) !== null && $step !== $activeStep);
     if ($lastStep !== null) {
         $param = array('c_step' => $lastStep);
         $view->standardUrlBack = $view->url($cTarget, $cCntl, $cAction, $param, array(), $cConfig);
     } else {
         $view->standardUrlBack = $view->url($bTarget, $bCntl, $bAction, array(), array(), $bConfig);
     }
     if (!isset($view->standardUrlNext) && ($nextStep = array_shift($steps)) !== null) {
         $param = array('c_step' => $nextStep);
         $view->standardUrlNext = $view->url($cTarget, $cCntl, $cAction, $param, array(), $cConfig);
     }
     // don't overwrite $view->standardUrlNext so order step URL is used
     return $view;
 }
开发者ID:aimeos,项目名称:ai-client-html,代码行数:99,代码来源:Standard.php

示例7: setViewParams

 /**
  * Sets the necessary parameter values in the view.
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
  * @param array &$tags Result array for the list of tags that are associated to the output
  * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
  * @return \Aimeos\MW\View\Iface Modified view object
  */
 protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
 {
     if (!isset($this->view)) {
         if (($pos = $view->param('l_pos')) !== null && ($pid = $view->param('d_prodid')) !== null) {
             if ($pos < 1) {
                 $start = 0;
                 $size = 2;
             } else {
                 $start = $pos - 1;
                 $size = 3;
             }
             $context = $this->getContext();
             $site = $context->getLocale()->getSite()->getCode();
             $params = $context->getSession()->get('aimeos/catalog/lists/params/last/' . $site, array());
             $filter = $this->getProductListFilterByParam($params);
             $filter->setSlice($start, $size);
             $total = null;
             $controller = \Aimeos\Controller\Frontend\Factory::createController($context, 'catalog');
             $products = $controller->getIndexItems($filter, array('text'), $total);
             if (($count = count($products)) > 1) {
                 $enc = $view->encoder();
                 $listPos = array_search($pid, array_keys($products));
                 $target = $view->config('client/html/catalog/detail/url/target');
                 $controller = $view->config('client/html/catalog/detail/url/controller', 'catalog');
                 $action = $view->config('client/html/catalog/detail/url/action', 'detail');
                 $config = $view->config('client/html/catalog/detail/url/config', array());
                 if ($listPos > 0 && ($product = reset($products)) !== false) {
                     $param = array('d_prodid' => $product->getId(), 'd_name' => $enc->url($product->getName('url ')), 'l_pos' => $pos - 1);
                     $view->navigationPrev = $view->url($target, $controller, $action, $param, array(), $config);
                 }
                 if ($listPos < $count - 1 && ($product = end($products)) !== false) {
                     $param = array('d_prodid' => $product->getId(), 'd_name' => $enc->url($product->getName('url')), 'l_pos' => $pos + 1);
                     $view->navigationNext = $view->url($target, $controller, $action, $param, array(), $config);
                 }
             }
         }
         $this->view = $view;
     }
     return $this->view;
 }
开发者ID:andreasfernandez,项目名称:aimeos-core,代码行数:48,代码来源:Standard.php

示例8: setViewParams

 /**
  * Sets the necessary parameter values in the view.
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
  * @param array &$tags Result array for the list of tags that are associated to the output
  * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
  * @return \Aimeos\MW\View\Iface Modified view object
  */
 protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
 {
     if (!isset($this->cache)) {
         $context = $this->getContext();
         $site = $context->getLocale()->getSite()->getCode();
         if (($params = $context->getSession()->get('aimeos/catalog/detail/params/last' . $site)) !== null) {
             $target = $view->config('client/html/catalog/detail/url/target');
             $controller = $view->config('client/html/catalog/detail/url/controller', 'catalog');
             $action = $view->config('client/html/catalog/detail/url/action', 'detail');
             $config = $view->config('client/html/catalog/detail/url/config', array());
         } else {
             $params = $context->getSession()->get('aimeos/catalog/lists/params/last' . $site, array());
             $target = $view->config('client/html/catalog/list/url/target');
             $controller = $view->config('client/html/catalog/list/url/controller', 'catalog');
             $action = $view->config('client/html/catalog/list/url/action', 'list');
             $config = $view->config('client/html/catalog/list/url/config', array());
         }
         $view->standardParams = $this->getClientParams($view->param());
         $view->standardBackUrl = $view->url($target, $controller, $action, $params, array(), $config);
         $view->standardBasket = \Aimeos\Controller\Frontend\Factory::createController($context, 'basket')->get();
         $this->cache = $view;
     }
     return $this->cache;
 }
开发者ID:mvnp,项目名称:aimeos-core,代码行数:32,代码来源:Standard.php

示例9: getUrlUpdate

 /**
  * Returns the URL to the update page.
  *
  * @param \Aimeos\MW\View\Iface $view View object
  * @param array $params Parameters that should be part of the URL
  * @param array $config Default URL configuration
  * @return string URL string
  */
 protected function getUrlUpdate(\Aimeos\MW\View\Iface $view, array $params, array $config)
 {
     $target = $view->config('client/html/checkout/update/url/target');
     $cntl = $view->config('client/html/checkout/update/url/controller', 'checkout');
     $action = $view->config('client/html/checkout/update/url/action', 'update');
     $config = $view->config('client/html/checkout/update/url/config', $config);
     return $view->url($target, $cntl, $action, $params, array(), $config);
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:16,代码来源:Standard.php

示例10: setViewParams

 /**
  * Sets the necessary parameter values in the view.
  *
  * @param \Aimeos\MW\View\Iface $view The view object which generates the HTML output
  * @param array &$tags Result array for the list of tags that are associated to the output
  * @param string|null &$expire Result variable for the expiration date of the output (null for no expiry)
  * @return \Aimeos\MW\View\Iface Modified view object
  */
 protected function setViewParams(\Aimeos\MW\View\Iface $view, array &$tags = array(), &$expire = null)
 {
     if (!isset($this->cache)) {
         $config = $this->getContext()->getConfig();
         /** client/html/catalog/detail/stock/enable
          * Enables or disables displaying product stock levels in product detail view
          *
          * This configuration option allows shop owners to display product
          * stock levels for each product in the detail views or to disable
          * fetching product stock information.
          *
          * The stock information is fetched via AJAX and inserted via Javascript.
          * This allows to cache product items by leaving out such highly
          * dynamic content like stock levels which changes with each order.
          *
          * @param boolean Value of "1" to display stock levels, "0" to disable displaying them
          * @since 2014.03
          * @category User
          * @category Developer
          * @see client/html/catalog/lists/stock/enable
          * @see client/html/catalog/stock/url/target
          * @see client/html/catalog/stock/url/controller
          * @see client/html/catalog/stock/url/action
          * @see client/html/catalog/stock/url/config
          */
         if (isset($view->detailProductItem) && $config->get('client/html/catalog/detail/stock/enable', true) === true) {
             $stockTarget = $config->get('client/html/catalog/stock/url/target');
             $stockController = $config->get('client/html/catalog/stock/url/controller', 'catalog');
             $stockAction = $config->get('client/html/catalog/stock/url/action', 'stock');
             $stockConfig = $config->get('client/html/catalog/stock/url/config', array());
             $prodIds = array_keys($view->detailProductItem->getRefItems('product', null, 'default'));
             array_unshift($prodIds, $view->detailProductItem->getId());
             $params = array('s_prodid' => $prodIds);
             $view->basketStockUrl = $view->url($stockTarget, $stockController, $stockAction, $params, array(), $stockConfig);
             $view->basketProductIds = $prodIds;
         }
         $this->cache = $view;
     }
     return $this->cache;
 }
开发者ID:boettner-it,项目名称:aimeos-core,代码行数:48,代码来源:Standard.php


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