appHelper = $appHelper; } protected function content(array $request = []): string { $profile = Profile::load($this->appHelper, $this->parameters['nickname'] ?? '', false); if (!$profile) { throw new HTTPException\NotFoundException($this->t('Profile not found.')); } if (empty($profile['hidewall'])) { $this->baseUrl->redirect('profile/' . $profile['nickname']); } $tpl = Renderer::getMarkupTemplate('exception.tpl'); return Renderer::replaceMacros($tpl, [ '$title' => $this->t('Restricted profile'), '$message' => $this->t('This profile has been restricted which prevents access to their public content from anonymous visitors.'), ]); } }