CorePlugins

# Class: TableRule Source Location: /coreplugins/tables/common/TableRulesRegistry.php
### Class Overview
    BaseRule
       |
       --GroupRule
          |
          --TableRule
Base rule for rules that will be applied on tables #### Author(s): | ### Variables $tableId | ### Constants WEIGHT_TABLE_GLOBAL WEIGHT_TABLE_PARTIAL WEIGHT_TABLE_SINGLE | ### Methods applyRule applyRules checkRule getIndexes getWeight
### Child classes: ColumnRule Base rule for rules that will be applied on columns ColumnSelector Rule to keep only a set of columns (include) TableFilter Rule to modify table title RowUnselector Rule to remove a set of rows in a table RowSelector Rule to keep only a subset of the rows of a table ColumnReorder Rule to reorder the columns and theirs contents. | ### Inherited Constants #### Class: GroupRule GroupRule::WEIGHT_GROUP_GLOBAL GroupRule::WEIGHT_GROUP_PARTIAL GroupRule::WEIGHT_GROUP_SINGLE #### Class: BaseRule BaseRule::WEIGHT_NO_MATCH | ### Inherited Variables #### Class: GroupRule GroupRule::$groupId #### Class: BaseRule BaseRule::$log | ### Inherited Methods #### 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 206] Base rule for rules that will be applied on tables #### Tags:
abstract: |
[ Top ] ### Class Variables #### $tableId = [line 215] #### Tags:
access: | public
Type: | string
[ Top ] ### Class Methods ### method applyRule [line 266]
`void applyRule( Table $table, array $params)`
Executes a rule on a table Parameters are taken from the weights structure. #### Tags:
access: | public
see: | GroupRule::addWeight()
Overridden in child classes as: ColumnRule::applyRule() Executes a rule on a column CellFilter::applyRule() Execute a rule on cells of a column CellFilterBatch::applyRule() Execute a rule on cells of a column ColumnFilter::applyRule() Execute a rule on a column ColumnSelector::applyRule() Executes a rule on a table ColumnUnselector::applyRule() Executes a rule on a table TableFilter::applyRule() Execute a rule on a table ColumnAdder::applyRule() Execute a rule on table ColumnAdderBatch::applyRule() Execute a rule on table RowUnselector::applyRule() Execute a rule on each rows of a table RowSelector::applyRule() Executes a rule on every rows of a table ColumnReorder::applyRule() Executes a rule on a table Overrides GroupRule::applyRule() (Executes a rule on a group) #### Parameters:
Table | $table |
array | $params |
[ Top ] ### method applyRules [line 274]
`void applyRules( array $rules, string $groupId, Table $table)`
Applies a set of rules on a table #### Tags:
access: | public
static: |
Overridden in child classes as: ColumnRule::applyRules() Applies a set of rules on a column Overrides GroupRule::applyRules() (Applies a set of rules on a group) #### Parameters:
array | $rules | array of TableRule
string | $groupId |
Table | $table |
[ Top ] ### method checkRule [line 247]
`void checkRule( string $groupId, string $tableId, array &$weights)`
Checks a rule #### Tags:
access: | protected
Overridden in child classes as: ColumnRule::checkRule() Checks a rule Overrides GroupRule::checkRule() (Checks a rule) #### Parameters:
string | $groupId |
string | $tableId |
array | &$weights |
[ Top ] ### method getIndexes [line 290]
`array getIndexes( Table $table)`
Returns a map of index id's to their offset in the columnIds array. #### Tags:
access: | protected
#### Parameters:
Table | $table |
[ Top ] ### method getWeight [line 224]
`int getWeight( string $groupId, string $tableId)`
Computes weight #### Tags:
access: | protected
see: | GroupRule::getWeight()
Overridden in child classes as: ColumnRule::getWeight() Computes weight Overrides GroupRule::getWeight() (Computes weight) #### Parameters:
string | $groupId |
string | $tableId |
[ Top ] ### Class Constants #### WEIGHT_TABLE_GLOBAL = 8 [line 210] [ Top ] #### WEIGHT_TABLE_PARTIAL = 16 [line 209] [ Top ] #### WEIGHT_TABLE_SINGLE = 32 [line 208] [ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:09 +0200 by phpDocumentor 1.3.0RC3