Comments: on this page. Click to read or post your own.

Class ErrorPage

Description

ErrorPage holds the content for the page of an error response.

Renders the page on each publish action into a static HTML file within the assets directory, after the naming convention /assets/error-<statuscode>.html. This enables us to show errors even if PHP experiences a recoverable error. ErrorPages

Located in /sapphire/core/model/ErrorPage.php (line 13)

Page
   |
   --ErrorPage
Variable Summary
static mixed $db
static mixed $defaults
Method Summary
void getCMSFields ()
void publish (string|int $fromStage, string $toStage, [boolean $createNewVersion = false])
Variables
static mixed $db = array(
"ErrorCode" => "Int",
)
(line 15)
static mixed $defaults = array(
"ShowInMenus" => 0,
"ShowInSearch" => 0
)
(line 19)
Methods
getCMSFields (line 47)
void getCMSFields ()
publish (line 95)

When an error page is published, create a static HTML page with its content, so the page can be shown even when SilverStripe is not functioning correctly before publishing this page normally.

void publish (string|int $fromStage, string $toStage, [boolean $createNewVersion = false])
  • string|int $fromStage: Place to copy from. Can be either a stage name or a version number.
  • string $toStage: Place to copy to. Must be a stage name.
  • boolean $createNewVersion: Set this to true to create a new version number. By default, the existing version number will be copied over.
requireDefaultRecords (line 27)

Ensures that there is always a 404 page.

void requireDefaultRecords ()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:40:45 +1300 by phpDocumentor 1.3.2