API Documentation for: 1.1.1
Show:

AdminUserController Class

Controller to manage the user management form. 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)

addElement

(
  • element
)
protected

Inherited from AdminObjectController:

Add a custom form element

Parameters:

addNotice

(
  • message
)
protected

Inherited from AdminObjectController:

Add a notice to the buffer output

Parameters:

  • message String

    The message to output

addTemplate

(
  • template
  • [data=[]
)
protected

Inherited from AdminController:

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

getPrivileges

(
  • [privilege=0]
)
private

Get the form select of privileges

Parameters:

  • [privilege=0] Int optional

    The current user's privileger

ignoreFields

(
  • fields
)

Inherited from AdminObjectController:

Ignore field names

Parameters:

  • fields String multiple

    The field name as separate arguments

onElementAdd

(
  • event
)

Handle specific elements

Parameters:

onElementAdded

(
  • event
)

Handle specific elements

Parameters:

optionalFields

(
  • fields
)

Inherited from AdminObjectController:

Don't add the required class to these fields

Parameters:

  • fields String multiple

    The field name as separate arguments

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

Inherited from AdminController:

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

Inherited from AdminController:

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

allObjects

Array protected

Inherited from AdminObjectController:

The collection of all object, this can be used to eliminate an additional database request for all the pages.

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

formName

String protected

Inherited from AdminObjectController:

The name of the full form

getObject

String protected

Inherited from AdminObjectController:

The method name on the item service to get the object by id

getObjects

String protected

Inherited from AdminObjectController:

The method name on the item service to get all objects

ignoreFields

Array private

Inherited from AdminObjectController:

The collection of field names which we should ignore render for

object

Object protected

Inherited from AdminObjectController:

The selected object

optionalFields

Array private

Inherited from AdminObjectController:

The collection of field names which are optional to input

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

removeEnabled

Boolean protected

Inherited from AdminObjectController:

If the delete button is enabled

Default: true

settings

SettingsManager

Inherited from CanteenBase:

Get the instance of the settings manager

site

Site

Inherited from CanteenBase:

Convenience getter for the site

titleName

String protected

Inherited from AdminObjectController:

The name of the item field for use in the select form list

Default: 'title'

user

Authorization

Inherited from CanteenBase:

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