getContainer(); /** @var Flex $flex */ $flex = $container['flex']; return $flex; } /** * @return UserInterface|null */ protected function getActiveUser(): ?UserInterface { $container = $this->getContainer(); /** @var UserInterface|null $user */ $user = $container['user'] ?? null; return $user; } /** * @return bool */ protected function isAdminSite(): bool { $container = $this->getContainer(); return isset($container['admin']); } /** * @return string */ protected function getAuthorizeScope(): string { return $this->isAdminSite() ? 'admin' : 'site'; } }