/** * {@inheritdoc} */ public function getNavigationItems(array $options = []) { if (!$this->securityChecker->hasPermission(WebsiteAdmin::getAnalyticsSecurityContext($options['webspace']), PermissionTypes::VIEW)) { return []; } $analytics = new ContentNavigationItem('content-navigation.webspace.analytics'); $analytics->setId('tab-analytics'); $analytics->setAction('analytics'); $analytics->setPosition(20); $analytics->setComponent('webspace/settings/analytics@suluwebsite'); return [$analytics]; }
/** * {@inheritdoc} */ public function getSecurityContext() { $request = $this->container->get('request_stack')->getCurrentRequest(); return WebsiteAdmin::getAnalyticsSecurityContext($request->get('webspaceKey')); }