API Documentation for: 1.1.1
Show:

AdminController Class

Extends Controller
Namespace: Canteen\Controllers

For processing videos pages. Located in the namespace Canteen\Controllers.

Methods

addData

(
  • name
  • value
)

Inherited from Controller:

Add a data substitution variable

Parameters:

  • name String | Dictionary | Object

    The name of the data variable or an array of (name=>value, name=>value)

  • value Mixed

    The string of the value (optional if setting one data property)

addTemplate

(
  • template
  • [data=[]
)
protected

Add the admin page by template, if there is no template use the default prerender() method

Parameters:

  • template String

    The template name

  • [data=[] Dictionary optional

    The optional substitution variables

addTitle

(
  • title
  • [separator=.]
)

Inherited from Controller:

Prepend to the page title

Parameters:

  • title String

    The title string to prepend

  • [separator=.] String optional

    The title separator, default is a period

getData

() Dictionary

Inherited from Controller:

Get the data variables

Returns:

Dictionary:

Data variables for substitution

getPage

() Page

Inherited from Controller

Get the current page object, this is an override before returning the page, we render the navigation

Returns:

Page:

The updated page object

parse

(
  • content
  • substitutions
)
String protected

Inherited from CanteenBase

Convenience method for parsing content

Parameters:

  • content String

    The string to parse

  • substitutions Dictionary

    The dictionary of tags to replace

Returns:

String:

The parsed string

pre-render

() private

Pre-render the admin page with the navigation

process

()

Inherited from Controller

The process method contains nothing navigation is created when renderNavigation is called.

service

(
  • alias
)
Service protected

Inherited from CanteenBase:

Get a service by alias

Parameters:

Returns:

Service:

The service matching the alias

setPage

(
  • page
)

Inherited from Controller:

Set the current page

Parameters:

  • page Page

    The page to build with this Controller

template

(
  • name
  • [substitutions=[]
)
String protected

Inherited from CanteenBase:

Convenience method for parsing content

Parameters:

  • name String

    The name of the template to parse

  • [substitutions=[] Dictionary optional

    The dictionary of tags to replace

Returns:

String:

The parsed string

Properties

_isPrerendered

Boolean private

Check to see if we've already been pre-rendered

cache

ServerCache

Inherited from CanteenBase:

Get the instance of the site cache

data

Dictionary protected

Inherited from Controller:

Any custom substitutions for the parser

dynamicUri

String protected

Inherited from Controller:

For dynamic pages, the extra stuff after the page URI

page

Page protected

Inherited from Controller:

The the current page

parser

Parser

Inherited from CanteenBase:

The parser is responsible for rendering templates

profiler

Profiler

Inherited from CanteenBase:

The instance of the profiler for debugging performance

settings

SettingsManager

Inherited from CanteenBase:

Get the instance of the settings manager

site

Site

Inherited from CanteenBase:

Convenience getter for the site

user

Authorization

Inherited from CanteenBase:

Get the Authorization class to handle things like login, password change