$slug]); if (!$profile instanceof SpaceProfile) { throw new NotFoundHttpException('Profile not found.'); } $space = Space::findOne(['contentcontainer_id' => $profile->contentcontainer_id]); if (!$space instanceof Space) { throw new NotFoundHttpException('Space not found.'); } if (!$space->moduleManager->isEnabled('space_profiles')) { throw new NotFoundHttpException('Profile not available.'); } if (!ProfileAccess::canView($space)) { throw new ForbiddenHttpException('You are not allowed to view this profile.'); } $this->view->title = Yii::t('SpaceProfilesModule.base', 'Rescue Profile') . ' - ' . $space->name; return $this->render('view', [ 'space' => $space, 'profile' => $profile, 'isPublicRoute' => true, ]); } }