xhp_labrys__error_page
Renders an Error Page.
class xhp_labrys__error_page extends xhp_x__elementAccepts an attribute, ConstMap<string,mixed> values, which can contain the
following fields: title, detail, extra. The field extra itself should
be a KeyedTraversable which can contain exception, 'message', 'stack',
and errors (which is a Traversable that should contain ConstMap values
that have a field and code).
$values = Map{
'title' => 'Foo',
'detail' => 'Bar',
'extra' => [
'errors' => [
Map{'field' => 'foobar', 'code' => 'REQUIRED'},
Map{'field' => 'example', 'code' => 'REQUIRED'}
],
'exception' => [
'class' => 'RuntimeException',
'message' => 'Hello World',
'stack' => '…',
'previous' => [
'class' => 'RuntimeException',
'message' => 'Hello World',
'stack' => '…'
]
]
]
};
return <labrys:error-page values={$values} />;
- Copyright
- 2015-2016 Appertly
- License
- Apache-2.0
Instance Methods
| Returns | Signature and Description |
|---|---|
XHPRoot | render() |
Method Details
render
protected function
render()| Type | Description |
|---|---|
XHPRoot |