\Nano4\ControllersMessages

A Trait that handles translatable text strings, status messages, and adds the HTML template handler for Views (also with translatable text.)

If you're going to use the add_status_json() method, you'll need the JSON trait loaded first.

Summary

Methods
Properties
Constants
get_text()
msg()
message()
store_messages()
redirect_msg()
go_msg()
error()
show_error()
redirect_error()
redirect_warn()
go_error()
go_warn()
warning()
warn()
has_status()
has_errors()
add_status_json()
No public properties found
No constants found
__construct_messages_controller()
$text
$lang
$status_types
N/A
No private methods found
No private properties found
N/A

Properties

$text

$text : 

Type

$lang

$lang : 

Type

$status_types

$status_types : 

Type

Methods

get_text()

get_text() 

msg()

msg(  $name,   $opts = array()) 

Parameters

$name
$opts

message()

message(  $name,   $opts = array()) 

Parameters

$name
$opts

store_messages()

store_messages() 

Store any current messages in the session, so they can be retreived on a redirect.

redirect_msg()

redirect_msg(  $name,   $url = Null,   $opts = array()) 

Parameters

$name
$url
$opts

go_msg()

go_msg(  $msg,   $page,   $params = array(),   $gopts = array(),   $mopts = array()) 

Parameters

$msg
$page
$params
$gopts
$mopts

error()

error(  $name,   $opts = array()) 

Parameters

$name
$opts

show_error()

show_error(  $name,   $opts = array()) 

Parameters

$name
$opts

redirect_error()

redirect_error(  $name,   $url = Null,   $opts = array()) 

Parameters

$name
$url
$opts

redirect_warn()

redirect_warn(  $name,   $url = Null,   $opts = array()) 

Parameters

$name
$url
$opts

go_error()

go_error(  $msg,   $page,   $params = array(),   $gopts = array(),   $mopts = array()) 

Parameters

$msg
$page
$params
$gopts
$mopts

go_warn()

go_warn(  $msg,   $page,   $params = array(),   $gopts = array(),   $mopts = array()) 

Parameters

$msg
$page
$params
$gopts
$mopts

warning()

warning(  $name,   $opts = array()) 

Parameters

$name
$opts

warn()

warn(  $name,   $opts = array()) 

Parameters

$name
$opts

has_status()

has_status(  $type) 

Parameters

$type

has_errors()

has_errors() 

add_status_json()

add_status_json(  $messages) 

Add a 'status_messages' JSON element.

Pass it a list of messages to include in the JSON.

Parameters

$messages

__construct_messages_controller()

__construct_messages_controller(  $opts = array()) 

Parameters

$opts