Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
GenericButton.php
Go to the documentation of this file.
1 <?php
7 
9 
15 {
21  protected $urlBuilder;
22 
28  protected $registry;
29 
36  public function __construct(
37  \Magento\Backend\Block\Widget\Context $context,
38  \Magento\Framework\Registry $registry
39  ) {
40  $this->urlBuilder = $context->getUrlBuilder();
41  $this->registry = $registry;
42  }
43 
49  public function getCustomerId()
50  {
51  return $this->registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
52  }
53 
61  public function getUrl($route = '', $params = [])
62  {
63  return $this->urlBuilder->getUrl($route, $params);
64  }
65 }
__construct(\Magento\Backend\Block\Widget\Context $context, \Magento\Framework\Registry $registry)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18