Public Member Functions | Public Attributes

SessionFilterComponent Class Reference

SessionFilterComponent class. More...

List of all members.

Public Member Functions

 initialize (&$controller, $settings=array())
 initialize component
 startup (&$controller)
 startup component
 setup ($name=null)
 setup Session Filter
 which ()
 return filter session key
 getFromUrl ()
 get filter from url only named params inside self::urlArgsAccepted will be returned
 setFromUrl ($merge=true)
 setup filter session reading some params from url
 add ($key, $value)
 add a key to current filter session
 addBulk (array $filter, $merge=false)
 add bulk filters to session
 arrange (array &$filter)
 arrange data before insert in session empty values are removed
 read ($key=null)
 read a filter key
 delete ($key)
 delete a key from filter
 clean ()
 clean self::$sessionKey from session
 cleanAll ()
 clean all filter in session

Public Attributes

 $components = array('Session')
 $controller = null

Detailed Description

SessionFilterComponent class.

Handle filter session used to list BEdita objects. The session key used to store filter is usually built as self::$sessionKeyPrefix . '.ControllerName.actionName'

Definition at line 31 of file session_filter.php.


Member Function Documentation

SessionFilterComponent::add ( key,
value 
)

add a key to current filter session

Parameters:
string $key
mixed $value

Definition at line 181 of file session_filter.php.

References arrange(), and read().

SessionFilterComponent::addBulk ( array $  filter,
merge = false 
)

add bulk filters to session

Parameters:
array $filter array of filters to add
boolean $merge false to override old filter (default) true to merge with old filter

Definition at line 199 of file session_filter.php.

References arrange(), and read().

Referenced by delete(), setFromUrl(), and setup().

SessionFilterComponent::arrange ( array &$  filter  ) 

arrange data before insert in session empty values are removed

Parameters:
array $filter

Definition at line 217 of file session_filter.php.

Referenced by add(), and addBulk().

SessionFilterComponent::clean (  ) 

clean self::$sessionKey from session

Returns:
boolean true if session variable is set and can be deleted, false if variable was not set

Definition at line 274 of file session_filter.php.

Referenced by read(), and setup().

SessionFilterComponent::cleanAll (  ) 

clean all filter in session

Returns:
boolean true if session variable is set and can be deleted, false if variable was not set

Definition at line 283 of file session_filter.php.

SessionFilterComponent::delete ( key  ) 

delete a key from filter

Parameters:
string $key
Returns:
boolean true if session variable is set and can be deleted, false if variable was not set

Definition at line 259 of file session_filter.php.

References addBulk().

SessionFilterComponent::getFromUrl (  ) 

get filter from url only named params inside self::urlArgsAccepted will be returned

Returns:
array

Definition at line 150 of file session_filter.php.

Referenced by setFromUrl().

SessionFilterComponent::initialize ( &$  controller,
settings = array() 
)

initialize component

Parameters:
Controller $controller
array $settings

Definition at line 82 of file session_filter.php.

SessionFilterComponent::read ( key = null  ) 

read a filter key

Parameters:
string $key
Returns:
array

Definition at line 231 of file session_filter.php.

References clean().

Referenced by add(), addBulk(), and setFromUrl().

SessionFilterComponent::setFromUrl ( merge = true  ) 

setup filter session reading some params from url

Parameters:
boolean $merge true to merge with existing filter (default) false to override all filter

Definition at line 169 of file session_filter.php.

References addBulk(), getFromUrl(), and read().

SessionFilterComponent::setup ( name = null  ) 

setup Session Filter

  • setup self::sessionKey
  • clean filter if not empty $controller->params['form']['cleanFilter']
  • if not to clean, setup filter if not empty $controller->params['form']['filter']
    Parameters:
    string $name suffix to assign to session key if empty ControllerName.actionName was used

Definition at line 111 of file session_filter.php.

References addBulk(), and clean().

Referenced by startup().

SessionFilterComponent::startup ( &$  controller  ) 

startup component

starts the setup in BEdita backend for frontend apps the setup starts in FrontendController::route() if the config var 'enableSessionFilter' is set to true

Parameters:
Controller $controller

Definition at line 95 of file session_filter.php.

References setup().

SessionFilterComponent::which (  ) 

return filter session key

Returns:
string

Definition at line 140 of file session_filter.php.


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:47 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus