urlBuilder = $context->getUrlBuilder(); $this->registry = $registry; } /** * Return the customer Id. * * @return int|null */ public function getCustomerId() { return $this->registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID); } /** * Generate url by route and parameters * * @param string $route * @param array $params * @return string */ public function getUrl($route = '', $params = []) { return $this->urlBuilder->getUrl($route, $params); } }