Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
8 
14 {
20  protected $_urlBuilder;
21 
25  public function __construct(\Magento\Backend\Block\Template\Context $context)
26  {
27  $this->_urlBuilder = $context->getUrlBuilder();
28  parent::__construct($context);
29  }
30 
38  public function getUrl($route = '', $params = [])
39  {
40  return $this->_urlBuilder->getUrl($route, $params);
41  }
42 }
__construct(\Magento\Backend\Block\Template\Context $context)
Definition: Index.php:25
getUrl($route='', $params=[])
Definition: Index.php:38
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18