getStoreIds(); if (count($storeIds)) { $storeId = array_shift($storeIds); } else { $storeId = 0; } $this->storeId = $storeId; $scope = $this->_storeManager->getStore($this->storeId); $url = $this->_url->setScope($scope) ->getUrl('', [ '_direct' => $this->getUrlPath($object->getIdentifier(), $controllerName), 'key' => null, '_nosid' => true, ] ); $url .= (false === strpos($url, '?')) ? '?' : '&'; $url .= 'secret=' . $object->getSecret(); return $url; } }