InterfaceController

Extends \AppController

Main Interface Controller

All interfaces should extend the interface controller. This provides useful functions such as checking if a user is authorized to view the given interface.

author

Russell Toris - rctoris@wpi.edu

copyright

2014 Worcester Polytechnic Institute

link

https://github.com/WPI-RAIL/rms

since

RMS v 2.0.0

version 2.0.9
package

app.Controller

Methods

Set global flags and variables for views. This includes the 'pages' variable for the menu generation and the `admin` flag for admin checking.

beforeFilter() : null
inherited

Response

null

The global authorization method. This will be automatically called and used if the authorize controller is an an included component in the given controller.

isAuthorized() : boolean
inherited

Response

boolean

Returns if the user is authorized.

Send an email to a group of given users. No effect is made if email is disabled.

sendBatchEmail(array $bcc = array(), string $subject = '', string $message = '') : null
inherited

Arguments

$bcc

array

The email addresses to send to.

$subject

string

The message subject.

$message

string

The message text.

Response

null

Send an email message to a user. No effect is made if email is disabled.

sendEmail(integer $id = null, string $subject = '', string $message = '') : null
inherited
throws

Thrown if an invalid user ID is given.

Arguments

$id

integer

The user ID to send the message email to.

$subject

string

The message subject.

$message

string

The message text.

Response

null

Default view function. This method can be overwritten for custom controller functionality.

view() : null

Response

null

Properties

The used models for the controller.

uses : array
inherited
var

Type(s)

array

The used helpers for the controller.

helpers : array
var

Type(s)

array

The used components for the controller.

components : array
inherited
var

Type(s)

array