CorePlugins

# Class: CellFilter Source Location: /coreplugins/tables/common/TableRulesRegistry.php
### Class Overview
    BaseRule
       |
       --GroupRule
          |
          --TableRule
             |
             --ColumnRule
                |
                --CellRule
                   |
                   --CellFilter
Rule to modify content of cells one by one | ### Variables $callback $currentTableId $inputColumnIds $useAllFields | ### Methods __construct applyRule
### Child classes: CellFilterBatch Rule to modify content of all cells | ### Inherited Constants #### Class: ColumnRule ColumnRule::WEIGHT_COLUMN_GLOBAL ColumnRule::WEIGHT_COLUMN_PARTIAL ColumnRule::WEIGHT_COLUMN_SINGLE #### Class: TableRule TableRule::WEIGHT_TABLE_GLOBAL TableRule::WEIGHT_TABLE_PARTIAL TableRule::WEIGHT_TABLE_SINGLE #### Class: GroupRule GroupRule::WEIGHT_GROUP_GLOBAL GroupRule::WEIGHT_GROUP_PARTIAL GroupRule::WEIGHT_GROUP_SINGLE #### Class: BaseRule BaseRule::WEIGHT_NO_MATCH | ### Inherited Variables #### Class: ColumnRule ColumnRule::$columnId #### Class: TableRule TableRule::$tableId #### Class: GroupRule GroupRule::$groupId #### Class: BaseRule BaseRule::$log | ### Inherited Methods #### Class: ColumnRule ColumnRule::applyRule() Executes a rule on a column ColumnRule::applyRules() Applies a set of rules on a column ColumnRule::checkRule() Checks a rule ColumnRule::getWeight() Computes weight #### Class: TableRule TableRule::applyRule() Executes a rule on a table TableRule::applyRules() Applies a set of rules on a table TableRule::checkRule() Checks a rule TableRule::getIndexes() Returns a map of index id's to their offset in the columnIds array. TableRule::getWeight() Computes weight #### Class: GroupRule GroupRule::addWeight() Stores computed weights GroupRule::applyRule() Executes a rule on a group GroupRule::applyRules() Applies a set of rules on a group GroupRule::checkRule() Checks a rule GroupRule::getWeight() Computes weight #### Class: BaseRule BaseRule::__construct() Constructor
### Class Details [line 645] Rule to modify content of cells one by one Callback method should have the following signature:
     static function myCallbackMethod('table_id', 'column_id',
                                      array ('column_1' => 'value_1',
                                             'column_2' => 'value_2'))
       return 'cell_value'
[ Top ] ### Class Variables #### $callback = [line 662] Callback method Syntax is:
     array('PluginClass', 'myCallbackMethod')
#### Tags:
access: | public
Type: | array
[ Top ] #### $currentTableId = [line 668] Current processed table Id. #### Tags:
access: | protected
Type: | string
[ Top ] #### $inputColumnIds = [line 651] Ids of columns used by callback method to compute new value #### Tags:
access: | public
Type: | array
[ Top ] #### $useAllFields = [line 673] #### Tags:
access: | protected
Type: | bool
[ Top ] ### Class Methods ### constructor __construct [line 683]
`CellFilter __construct( string $groupId, string $tableId, string $columnId, array $inputColumnIds, array $callback)`
Constructor #### Tags:
access: | public
Overrides BaseRule::__construct() (Constructor) #### Parameters:
string | $groupId |
string | $tableId |
string | $columnId |
array | $inputColumnIds |
array | $callback |
[ Top ] ### method applyRule [line 701]
`void applyRule( Table $table, string $columnId, array $params)`
Execute a rule on cells of a column #### Tags:
access: | public
Overridden in child classes as: CellFilterBatch::applyRule() Execute a rule on cells of a column Overrides ColumnRule::applyRule() (Executes a rule on a column) #### Parameters:
Table | $table |
string | $columnId |
array | $params |
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:08 +0200 by phpDocumentor 1.3.0RC3