\NetCommonsComponent

NetCommons Component

Summary

Methods
Properties
Constants
initialize()
renderJson()
handleValidationError()
setFlashNotification()
setAppendHtml()
No public properties found
ALERT_SUCCESS_INTERVAL
ALERT_VALIDATE_ERROR_INTERVAL
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ALERT_SUCCESS_INTERVAL

ALERT_SUCCESS_INTERVAL = 2000 : string

alert

ALERT_VALIDATE_ERROR_INTERVAL

ALERT_VALIDATE_ERROR_INTERVAL = 6000 : string

alert

Methods

initialize()

initialize(\Controller  $controller) : void

Called before the Controller::beforeFilter().

Parameters

\Controller $controller

Instantiating controller

renderJson()

renderJson(array  $results = array(), string  $name = 'OK', integer  $status = 200) : void

render json

Parameters

array $results

results data

string $name

message

integer $status

status code

handleValidationError()

handleValidationError(array  $errors, string  $message = null) : boolean

Handle validation error

Parameters

array $errors

validation errors

string $message

エラーメッセージ

Returns

boolean —

true on success, false on error

setFlashNotification()

setFlashNotification(string  $message, array  $params = array(), integer  $status = 200) : void

Used to set a session variable that can be used to output messages in the view.

Parameters

string $message

message

array $params

Parameters to be sent to layout as view variables

integer $status

status code

setAppendHtml()

setAppendHtml(string  $html) : void

bodyタグの直下に強制的に埋め込むHTMLタグ。特にリダイレクト時に使用する

Parameters

string $html

HTML