Phundament App Class Reference
  • Package
  • Class
  • Tree

Packages

  • bootstrap
    • widgets
      • input
  • Image
  • None
  • p3admin
  • p3extensions
    • behaviors
    • commands
    • components
    • helpers
    • widgets
  • p3media
    • actions
    • controllers
    • models
  • p3pages
    • models
  • p3widgets
    • components
    • models
  • PHP
  • system
    • db
      • ar
    • gii
    • web
      • auth
      • helpers
      • widgets
  • yiiext
    • widgets
      • fancybox
      • lipsum
  • zii
    • widgets
      • grid

Classes

  • ActivationController
  • AdminController
  • AssignmentController
  • AssignmentForm
  • AuthChildForm
  • AuthItemController
  • AuthItemForm
  • BaseP3Widget
  • BaseP3WidgetMeta
  • BaseP3WidgetTranslation
  • Bootstrap
  • CImageComponent
  • CKEditor
  • CodeProvider
  • DefaultController
  • EChosen
  • EDbMigration
  • EditableField
  • EditableSaver
  • EMigrateCommand
  • ESelect2
  • EUserFlash
  • FullCrudFieldProvider
  • GenerateForm
  • IdentificationColumnValidator
  • InstallController
  • JSONEditorView
  • JuiJSONEditorInput
  • LoginController
  • LogoutController
  • Metadata
  • P3CrudFieldProvider
  • P3MediaController
  • P3MediaMetaController
  • P3MediaSelect
  • P3PageController
  • P3PageMetaController
  • P3PageTranslationController
  • P3Widget
  • P3WidgetController
  • P3WidgetMetaController
  • P3WidgetTranslation
  • P3WidgetTranslationController
  • ProfileController
  • ProfileFieldController
  • RAuthItemBehavior
  • RAuthItemChildDataProvider
  • RAuthItemDataProvider
  • RAuthItemParentDataProvider
  • RAuthorizer
  • RController
  • RDbAuthManager
  • RecoveryController
  • RegistrationController
  • RegistrationForm
  • RGenerator
  • Rights
  • RightsFilter
  • RightsModule
  • RInstaller
  • RPermissionDataProvider
  • RUserBehavior
  • RWebUser
  • UActiveForm
  • UploadHandler
  • UserChangePassword
  • UserController
  • UserIdentity
  • UserLogin
  • UserModule
  • UserRecoveryForm
  • UWdropDownDep
  • UWfile
  • UWjuiAutoComplete
  • UWjuidate
  • UWrelBelongsTo
  • WebUserBehavior

Class EUserFlash

EUserFlash.php

Simplifies user flash messages

CComponent
Extended by CBaseController
Extended by CWidget
Extended by EUserFlash
Category: User Interface
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
# renderMessages( )

Render the user flash messages

Render the user flash messages

Returns

integer
count of the rendered messages
protected
# renderMessage( mixed $messageType, mixed $message, mixed $htmlOptions )

Render a message

Render a message

public static
# setNoticeMessage( string $message, mixed $context = '', string $logLevel = '' )

Set a user flash notice message

Set a user flash notice message

Parameters

$message
string
$message
$context
mixed
$context string or array
$logLevel
string
$cssClass
public static
# setSuccessMessage( string $message, mixed $context = '', string $logLevel = '' )

Set a user flash success message

Set a user flash success message

Parameters

$message
string
$message
$context
mixed
$context string or array
$logLevel
string
$cssClass
public static
# setErrorMessage( string $message, mixed $context = '', string $logLevel = CLogger::LEVEL_ERROR )

Set a user flash error message

Set a user flash error message

Parameters

$message
string
$message
$context
mixed
$context string or array
$logLevel
string
$cssClass
public static
# setWarningMessage( string $message, mixed $context = '', string $logLevel = CLogger::LEVEL_WARNING )

Set a user flash warning message

Set a user flash warning message

Parameters

$message
string
$message
$context
mixed
$context string or array
$logLevel
string
$cssClass
public static
# setAlertMessage( string $message, mixed $context = '', string $logLevel = '' )

Set a user flash as javascript alert

Set a user flash as javascript alert

Parameters

$message
string
$message
$context
mixed
$context string or array
$logLevel
string
$cssClass
public static
# setAjaxMessage( string $url, mixed $context = '', string $logLevel = '' )

Set a user flash as a ajax call

Set a user flash as a ajax call

Parameters

$url
string
$message
$context
mixed
$context string or array
$logLevel
string
$cssClass
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

Set a user flash message without a type You should maybe define a cssClass

Parameters

$message
string
$message
$context
mixed
$context string or array
$cssClass
string
$cssClass
$logLevel
$messageType
protected static array
# contextToArray( mixed $configString )

Convert context to array

Convert context to array

Parameters

$configString
mixed
$context

Returns

array
protected static string
# encodeFlashKey( string $messageType, mixed $context, string $cssClass, mixed $logLevel )

Encode the flash key

Encode the flash key

Parameters

$messageType
string
$messageType
$context
mixed
$context
$cssClass
string
$cssClass
$logLevel

Returns

string
protected
# decodeFlashKey( string $key, string & $messageType = '', array & $context = null, string & $cssClass = '', mixed & $logLevel = '' )

Decode the flash key

Decode the flash key

Parameters

$key
string
$key
$messageType
string
$messageType
$context
array
$context
$cssClass
string
$cssClass
$logLevel
protected string
# getCssClass( string $messageType )

Get the css class for the specified $messageType

Get the css class for the specified $messageType

Parameters

$messageType
string
$messageType

Returns

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

Log the message Adds user, ipaddress, controller route _GET, _POST ... if $logLevel='error' configurable: see property errorLogVars

Parameters

$messageType
mixed
$messageType
$context
mixed
$context
$message
mixed
$message
$logLevel
mixed
$logLevel

Returns

mixed
public mixed
# registerClientScript( )

EUserFlash::registerClientScript()

EUserFlash::registerClientScript()

Returns

mixed
public
# run( )

Render the flash messages

Render the flash messages

Overrides

CWidget::run
public static integer
# renderFlashes( CBaseController $controller, array $properties = array() )

Render the flash messages and return renderedCount

Render the flash messages and return renderedCount

Parameters

$controller
CBaseController
$controller
$properties
array
$properties

Returns

integer
count of rendered messages

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'

Add this GLOBALS to the logmessage if loglevel is 'error'

public mixed $context
#
  1. If $context not is set, all messages independent of the context

    will be rendered

  1. If $context not is set, all messages independent of the context will be rendered
  2. $context='' will render the messages with no context
  3. $context='activate,login' or $context=array('activate','login') will render the messages with the specified context
public boolean $deleteMessages
#

Delete the messages after rendering

Delete the messages after rendering

public string $tag
#

The wrapper tag for the messages

The wrapper tag for the messages

public string $cssClassDefault
#

The css class for a unknown messageType

The css class for a unknown messageType

public string $cssClassNotice
#

The css class for a notice message

The css class for a notice message

public string $cssClassError
#

The css class for a error message

The css class for a error message

public string $cssClassWarning
#

The css class for a warning message

The css class for a warning message

public string $cssClassSuccess
#

The css class for a success message

The css class for a success message

public mixed $initScript
#

Javascript code that will be added as clientscript if $initScriptEnabled = true

Javascript code that will be added as clientscript if $initScriptEnabled = true

FadeOut success and notice messages: "$('.userflash_success').fadeOut(10000);$('.userflash_notice').fadeOut(10000);"; For all type of messages use: "$('.userflash').....;";

public array $htmlOptions
#

The htmlOptions for the wrapper tag

The htmlOptions for the wrapper tag

public boolean $loggingEnabled
#

Switch On/Off the logging

Switch On/Off the logging

Properties inherited from CWidget

$actionPrefix, $skin

Magic properties inherited from CWidget

$controller, $id, $owner, $viewPath

Phundament App Class Reference API documentation generated by ApiGen 2.8.0