Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
FilterHelper Class Reference

Public Member Functions

 compareFilters (&$filterA, $filterBSettings, &$filterBSubfilters)
 
configureFilter ($filterNode, $persist=true)
 
 getFilterSetting ($settingNode)
 
 installFilterGroups ($filterGroupsNode)
 
 readArraySetting ($arrayNode)
 

Detailed Description

Class that provides filter-related helper methods.

Definition at line 15 of file FilterHelper.inc.php.

Member Function Documentation

FilterHelper::compareFilters ( $filterA,
  $filterBSettings,
$filterBSubfilters 
)

Recursively compares two filters (filter A and filter B) based on their settings and sub-filters.

Parameters
$filterAPersistableFilter
$filterBSettingsarray an array of key/value pairs
$filterBSubfiltersarray an array of filters
Returns
boolean true if the two transformations are identical, false otherwise

Definition at line 137 of file FilterHelper.inc.php.

Referenced by configureFilter().

& FilterHelper::configureFilter (   $filterNode,
  $persist = true 
)

Helper method that configures and optionally installs a filter based on the given XML node which represents a <filter> element.

Parameters
$filterNodeXMLNode
$persistboolean whether to install the filter
Returns
PersistableFilter the installed filter.

Definition at line 59 of file FilterHelper.inc.php.

References compareFilters(), DAORegistry\getDAO(), getFilterSetting(), and String\regexp_match().

FilterHelper::getFilterSetting (   $settingNode)

Helper method that extracts filter settings from the children of a <filter> element.

Parameters
$settingNodeXMLNode
Returns
$setting array a key-value pair.

Definition at line 185 of file FilterHelper.inc.php.

References readArraySetting().

Referenced by configureFilter().

FilterHelper::installFilterGroups (   $filterGroupsNode)

Helper method that installs filter groups based on the given XML node which represents a <filterGroups> element.

Parameters
$filterGroupsNodeXMLNode

Definition at line 22 of file FilterHelper.inc.php.

References DAORegistry\getDAO().

FilterHelper::readArraySetting (   $arrayNode)

Recursively read an array from an XML element list.

Parameters
$arrayNodeXMLNode
Returns
array

Definition at line 236 of file FilterHelper.inc.php.

Referenced by getFilterSetting().


The documentation for this class was generated from the following file: