SocialCoreController.php in Open Social 8.3
Same filename and directory in other branches
- 8.9 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8.2 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8.4 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8.5 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8.6 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8.7 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 8.8 modules/social_features/social_core/src/Controller/SocialCoreController.php
- 10.3.x modules/social_features/social_core/src/Controller/SocialCoreController.php
- 10.0.x modules/social_features/social_core/src/Controller/SocialCoreController.php
- 10.1.x modules/social_features/social_core/src/Controller/SocialCoreController.php
- 10.2.x modules/social_features/social_core/src/Controller/SocialCoreController.php
Namespace
Drupal\social_core\ControllerFile
modules/social_features/social_core/src/Controller/SocialCoreController.phpView source
<?php
namespace Drupal\social_core\Controller;
use Drupal\Core\Controller\ControllerBase;
/**
* Returns responses for social_core module routes.
*/
class SocialCoreController extends ControllerBase {
/**
* Custom function for returning markup on the access denied page.
*/
public function accessDenied() {
// Get the front page URL.
$frontpage = $this
->config('system.site')
->get('page.front');
// Determine the message we want to set.
$text = $this
->t("<p>You have insufficient permissions to view the page you're trying to access. There could be several reasons for this:</p><ul><li>You are trying to edit content you're not allowed to edit.</li><li>You are trying to view content (from a group) you don't have access to.</li><li>You are trying to access administration pages.</li></ul><p>Click the back button of your browser to go back where you came from or click <a href=\":url\">here</a> to go to the homepage</p>", [
':url' => $frontpage,
]);
// Return the message in the render array.
return [
'#markup' => $text,
];
}
/**
* Empty page for the homepage.
*/
public function stream() {
$element = [
'#markup' => '',
];
return $element;
}
}
Classes
Name | Description |
---|---|
SocialCoreController | Returns responses for social_core module routes. |