Elgg  Version master
Variables
error.php File Reference

Go to the source code of this file.

Variables

 $type = elgg_extract('type', $vars)
 The generic error page. More...
 
 $exception = elgg_extract('exception', $vars)
 
 $params = elgg_extract('params', $vars, [])
 
 $params ['exception'] = elgg_extract('exception', $params, $exception)
 
 $title = elgg_echo('error:default:title')
 
if(elgg_language_key_exists("error:{$type}:title")) if(elgg_view_exists("errors/{$type}")) else
 
 $httpCodes
 
if(isset($httpCodes[$type])) $layout = elgg_in_context('admin') && elgg_is_admin_logged_in() ? 'admin' : 'error'
 
 $body
 
 $shell = $layout
 
 if (!elgg_is_logged_in() &&elgg_get_config( 'walled_garden'))
 

Variable Documentation

◆ $body

$body
Initial value:
'title' => $title,
'content' => $content,
'filter' => false,
])
$content
Set robots.txt action.
Definition: set_robots.php:6
elgg_view_layout(string $layout_name, array $vars=[])
Displays a layout with optional parameters.
Definition: views.php:352
if(isset($httpCodes[$type])) $layout
Definition: error.php:46
$title
Definition: error.php:20

Definition at line 48 of file error.php.

◆ $exception

$exception = elgg_extract('exception', $vars)

Definition at line 15 of file error.php.

◆ $httpCodes

$httpCodes
Initial value:
= [
'400' => 'Bad Request',
'401' => 'Unauthorized',
'403' => 'Forbidden',
'404' => 'Not Found',
'407' => 'Proxy Authentication Required',
'500' => 'Internal Server Error',
'503' => 'Service Unavailable',
]

Definition at line 32 of file error.php.

◆ $layout

if (isset( $httpCodes[ $type])) $layout = elgg_in_context('admin') && elgg_is_admin_logged_in() ? 'admin' : 'error'

Definition at line 46 of file error.php.

◆ $params [1/2]

$params = elgg_extract('params', $vars, [])

Definition at line 17 of file error.php.

◆ $params [2/2]

$params[ 'exception'] = elgg_extract('exception', $params, $exception)

Definition at line 18 of file error.php.

◆ $shell

$shell = $layout

Definition at line 54 of file error.php.

◆ $title

$title = elgg_echo('error:default:title')

Definition at line 20 of file error.php.

◆ $type

$type = elgg_extract('type', $vars)

The generic error page.

@uses $vars['current_url'] The current page url @uses $vars['forward_url'] The HTTP Referer url @uses $vars['type'] The type of error (400, 403, 404, etc) @uses $vars['exception'] The exception which cause this page (instance of Elgg\HttpException) @uses $vars['params']['error'] The error text for the page

See also
\Elgg\Http\ResponseFactory::respondWithError()

Definition at line 14 of file error.php.

◆ else

if (elgg_language_key_exists("error:{$type}:title")) if (elgg_view_exists("errors/{$type}")) else
Initial value:
{
$content = elgg_view('errors/default', $params)
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
Definition: views.php:156
$params
Definition: error.php:17

Definition at line 28 of file error.php.

◆ if

if(!elgg_is_logged_in() &&elgg_get_config('walled_garden')) ( elgg_is_logged_in) &&elgg_get_config( 'walled_garden')

Definition at line 55 of file error.php.