urlBuilder = $context->getUrlBuilder(); $this->registry = $registry; } /** * Return the synonyms group Id. * * @return int|null */ public function getGroupId() { $synGroup = $this->registry->registry(RegistryConstants::SEARCH_SYNONYMS); return $synGroup ? $synGroup->getId() : null; } /** * 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); } }