Class EUserFlash
EUserFlash.php
Simplifies user flash messages
- CComponent
-
CBaseController
-
CWidget
-
EUserFlash
Copyright: 2011 myticket it-solutions gmbh
License: BSD License http://www.opensource.org/licenses/bsd-license.php
Author: Joe Blocher <yii@myticket.at>
Version: 1.4.1
Located at phundament/p3extensions/widgets/userflash/EUserFlash.php
Methods summary
public
integer
|
|
protected
|
|
public static
|
#
setNoticeMessage( string $message, mixed $context = '', string $logLevel = '' )
Set a user flash notice message |
public static
|
#
setSuccessMessage( string $message, mixed $context = '', string $logLevel = '' )
Set a user flash success message |
public static
|
#
setErrorMessage( string $message, mixed $context = '', string $logLevel = CLogger::LEVEL_ERROR )
Set a user flash error message |
public static
|
#
setWarningMessage( string $message, mixed $context = '', string $logLevel = CLogger::LEVEL_WARNING )
Set a user flash warning message |
public static
|
#
setAlertMessage( string $message, mixed $context = '', string $logLevel = '' )
Set a user flash as javascript alert |
public static
|
#
setAjaxMessage( string $url, mixed $context = '', string $logLevel = '' )
Set a user flash as a ajax call |
public static
|
#
setMessage( string $message, mixed $context = '', string $cssClass = '', mixed $logLevel = '', mixed $messageType = 'default' )
Set a user flash message without a type You should maybe define a cssClass |
protected static
array
|
|
protected static
string
|
#
encodeFlashKey( string $messageType, mixed $context, string $cssClass, mixed $logLevel )
Encode the flash key |
protected
|
#
decodeFlashKey( string $key, string & $messageType = '', array & $context = null, string & $cssClass = '', mixed & $logLevel = '' )
Decode the flash key |
protected
string
|
|
protected
mixed
|
#
logFlashMessage( mixed $messageType, mixed $context, mixed $message, mixed $logLevel )
Log the message Adds user, ipaddress, controller route _GET, _POST ... if $logLevel='error' configurable: see property errorLogVars |
public
mixed
|
|
public
|
|
public static
integer
|
#
renderFlashes( CBaseController $controller, array $properties = array() )
Render the flash messages and return renderedCount |
Methods inherited from CWidget
__construct()
,
actions()
,
getController()
,
getId()
,
getOwner()
,
getViewFile()
,
getViewPath()
,
init()
,
render()
,
setId()
Methods inherited from CBaseController
beginCache()
,
beginClip()
,
beginContent()
,
beginWidget()
,
createWidget()
,
endCache()
,
endClip()
,
endContent()
,
endWidget()
,
renderFile()
,
renderInternal()
,
widget()
Methods inherited from CComponent
__call()
,
__get()
,
__isset()
,
__set()
,
__unset()
,
asa()
,
attachBehavior()
,
attachBehaviors()
,
attachEventHandler()
,
canGetProperty()
,
canSetProperty()
,
detachBehavior()
,
detachBehaviors()
,
detachEventHandler()
,
disableBehavior()
,
disableBehaviors()
,
enableBehavior()
,
enableBehaviors()
,
evaluateExpression()
,
getEventHandlers()
,
hasEvent()
,
hasEventHandler()
,
hasProperty()
,
raiseEvent()
Magic methods summary
Constants summary
string |
LOG_CATEGORY
|
'userflash' |
Properties summary
public
array
|
$errorLogVars |
#
Add this GLOBALS to the logmessage if loglevel is 'error' |
public
mixed
|
$context |
#
|
public
boolean
|
$deleteMessages |
#
Delete the messages after rendering |
public
string
|
$tag |
#
The wrapper tag for the messages |
public
string
|
$cssClassDefault |
#
The css class for a unknown messageType |
public
string
|
$cssClassNotice |
#
The css class for a notice message |
public
string
|
$cssClassError |
#
The css class for a error message |
public
string
|
$cssClassWarning |
#
The css class for a warning message |
public
string
|
$cssClassSuccess |
#
The css class for a success message |
public
mixed
|
$initScript |
#
Javascript code that will be added as clientscript if $initScriptEnabled = true |
public
array
|
$htmlOptions |
#
The htmlOptions for the wrapper tag |
public
boolean
|
$loggingEnabled |
#
Switch On/Off the logging |
Properties inherited from CWidget
$actionPrefix
,
$skin
Magic properties inherited from CWidget
$controller
,
$id
,
$owner
,
$viewPath