Symphony Administration

public class Administration extends Symphony

class.administration.php #14

The Administration class is an instance of Symphony that controls all backend pages. These pages are HTMLPages are usually generated using XMLElement before being rendered as HTML. These pages do not use XSLT. The Administration is only accessible by logged in Authors

Properties

HTMLPage $Page

The class representation of the current Symphony backend page, which is a subclass of the HTMLPage class. Symphony uses a convention of prefixing backend page classes with 'content'. ie. 'contentBlueprintsSections'

Methods

boolean checkCoreForUpdates()

Scan the install directory to look for new migrations that can be applied to update this version of Symphony. If one if found, a new Alert is added to the page.

Returns

Returns true if there is an update available, false otherwise.

void checkExtensionsForUpdates()

Checks all installed extensions to see any have an outstanding update. If any do an Alert will be added to the current page directing the Author to the Extension page

string display(string $page)

Called by index.php, this function is responsible for rendering the current page on the Frontend. Two delegates are fired, AdminPagePreGenerate and AdminPagePostGenerate. This function runs the Profiler for the page build process.

Uses
  • AdminPagePreBuild
  • AdminPagePreGenerate
  • AdminPagePostGenerate
Parameters
  • $page stringThe result of getCurrentPage, which returns the $_GET['symphony-page'] variable.

Returns

The HTML of the page to return

See Also
void errorPageNotFound(string $context, string $output)

If a page is not found in the Symphony backend, this function should be called which will raise a customError to display the default Symphony page not found template

string getCurrentPageURL()

Returns the current Page path, excluding the domain and Symphony path.

Returns

The path of the current page, ie. '/blueprints/sections/'

array|boolean getPageCallback(string $page)

This function resolves the string of the page to the relevant backend page class. The path to the backend page is split on the slashes and the resulting pieces used to determine if the page is provided by an extension, is a section (index or entry creation) or finally a standard Symphony content page. If no page driver can be found, this function will return false.

Uses
  • AdminPagePostCallback
Parameters
  • $page stringThe full path (including the domain) of the Symphony backend page

Returns

If successful, this function will return an associative array that at the very least will return the page's classname, pageroot, driver, driver_location and context, otherwise this will return false.

static Administration instance()

This function returns an instance of the Administration class. It is the only way to create a new Administration, as it implements the Singleton interface

static boolean isLoggedIn()

Overrides the Symphony isLoggedIn function to allow Authors to become logged into the backend when $_REQUEST['auth-token'] is present. This logs an Author in using the loginFromToken function. A token may be 6 or 8 characters in length in the backend. A 6 or 16 character token is used for forget password requests, whereas the 8 character token is used to login an Author into the page

See Also

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details