eZPublish  4.5
eZMatrix Class Reference

The class eZMatrix does. More...

Public Member Functions

 addColumn ($columnDefinition)
 
 addColumnToCells ($columnDefinition)
 
 addColumnToMatrix ($columnDefinition)
 
 addRow ($beforeIndex=false, $addCount=1)
 
 adjustColumnIndex ($columnIndex, $newColumnIndex)
 
 adjustColumnName ($columnIndex, $newColumnName)
 
 adjustColumnsToDefinition ($classColumnsDefinition)
 
 attribute ($name)
 
 attributes ()
 
 buildReorderRuleForColumn ($columns, $pos)
 
 buildReorderRules ()
 
 column ($colIdx)
 
 copyDataBetweenColumns ($firstColIdx, $secondColIdx)
 
 decodeXML ($xmlString)
 
 domString ($domDocument)
 
 eZMatrix ($name, $numRows=false, $matrixColumnDefinition=false)
 
 getColumnsToRemove ($matrixColumnsDefinition)
 
 hasAttribute ($name)
 
 hasRuleForColumn ($rules, $pos)
 
 name ()
 
 removeColumn ($columnDefinition)
 
 removeRow ($rowNum)
 
 removeUselessColumns ($matrixColumnDefinition)
 
 reorderColumns ()
 
 setColumn ($colIdx, $column)
 
 setColumnIndex ($columnIndex, $newColumnIndex)
 
 setColumnName ($columnIndex, $newColumnName)
 
 setName ($name)
 
 xmlString ()
 

Public Attributes

 $Cells
 
 $Matrix
 Contains the Matrix array. More...
 
 $Name
 Contains the Matrix name. More...
 
 $NumColumns
 Contains the number of columns. More...
 
 $NumRows
 Contains the number of rows. More...
 

Protected Member Functions

 columnCellsData ($colIdx)
 
 columnDefinition ($colIdx)
 
 columnExists ($columnToFind, $matrixColumnsDefinition)
 
 columnIndex ($columnIdent)
 
 copyCellsDataBetweenColumns ($firstColIdx, $secondColIdx)
 
 copyDefinitionBetweenColumns ($col1, $col2)
 
 removeColumnFromCells ($columnDefinition)
 
 removeColumnFromMatrix ($columnDefinition)
 
 setColumnCellData ($colIdx, $cellData)
 
 setColumnDefinition ($colIdx, $columnDefinition)
 
 updateColumns ($matrixColumnDefinition)
 

Detailed Description

The class eZMatrix does.

Member Function Documentation

eZMatrix::addColumn (   $columnDefinition)

Adds column $columnDefinition to eZMatrix object.

Referenced by updateColumns().

eZMatrix::addColumnToCells (   $columnDefinition)

Adds column $columnDefinition to 'cells' member of eZMatrix.

Referenced by addColumn().

eZMatrix::addColumnToMatrix (   $columnDefinition)

Adds column $columnDefinition to 'matrix' member of eZMatrix.

Referenced by addColumn().

eZMatrix::addRow (   $beforeIndex = false,
  $addCount = 1 
)
eZMatrix::adjustColumnIndex (   $columnIndex,
  $newColumnIndex 
)

Check if column index differs, and so, set new index.

Parameters
columnIndexinternal column index
newColumnIndexnew column index
Returns
true if index differs

Referenced by updateColumns().

eZMatrix::adjustColumnName (   $columnIndex,
  $newColumnName 
)

Check if new column name differs from existing column name, and sets new name.

Parameters
columnIndexinternal column index
newColumnNamecolumn name
Returns
true if name differs

Referenced by updateColumns().

eZMatrix::adjustColumnsToDefinition (   $classColumnsDefinition)

Checks current eZMatrix object against definition. If columns ids are wrong or there are additional/redundant columns in definition/eZMatrix object then current eZMatix object will be adjusted according to $matrixColumnDefinition. Note: if id of some column was changed form "old_id" to "new_id" then a column with "old_id" will be removed(all data of this column will be lost) and an empty column with "new_id" will be created. Returns true if adjustment(matrix modification) was performed. Otherwise - false.

eZMatrix::attributes ( )

Referenced by hasAttribute().

eZMatrix::buildReorderRuleForColumn (   $columns,
  $pos 
)

Create reorder column reference array.

Referenced by buildReorderRules().

eZMatrix::buildReorderRules ( )

Build column reorder rules.

Referenced by reorderColumns().

eZMatrix::column (   $colIdx)

Get column data and definition

Parameters
colIdxcolumn index
Returns
column data and definition

Referenced by reorderColumns().

eZMatrix::columnCellsData (   $colIdx)
protected

Get column data

Parameters
colIdxcolumn index
Returns
column data

Referenced by column().

eZMatrix::columnDefinition (   $colIdx)
protected

Get column definition.

Parameters
colIdxcolumn index
Returns
column definition

Referenced by column().

eZMatrix::columnExists (   $columnToFind,
  $matrixColumnsDefinition 
)
protected

Searches column $columnToFind in $matrixColumnDefinition. Returns true if found, false - otherwise.

Referenced by getColumnsToRemove().

eZMatrix::columnIndex (   $columnIdent)
protected

Get internal column index by column indentifier

Parameters
columnIdentcolumn identifier
Returns
column index.

Referenced by updateColumns().

eZMatrix::copyCellsDataBetweenColumns (   $firstColIdx,
  $secondColIdx 
)
protected

Referenced by copyDataBetweenColumns().

eZMatrix::copyDataBetweenColumns (   $firstColIdx,
  $secondColIdx 
)

Referenced by reorderColumns().

eZMatrix::copyDefinitionBetweenColumns (   $col1,
  $col2 
)
protected

Referenced by copyDataBetweenColumns().

eZMatrix::decodeXML (   $xmlString)

Will decode an xml string and initialize the eZ matrix object

Referenced by adjustColumnsToDefinition(), and eZMatrix().

eZMatrix::domString (   $domDocument)
Returns
the XML structure in $domDocument as text. It will take of care of the necessary charset conversions for content storage.

Referenced by xmlString().

eZMatrix::eZMatrix (   $name,
  $numRows = false,
  $matrixColumnDefinition = false 
)

Constructor

eZMatrix::getColumnsToRemove (   $matrixColumnsDefinition)

Searches columns that are in matrix but not in $matrixColumnDefinition.

Referenced by removeUselessColumns().

eZMatrix::hasAttribute (   $name)
eZMatrix::hasRuleForColumn (   $rules,
  $pos 
)

static

Referenced by buildReorderRules().

eZMatrix::name ( )

Returns the name of the matrix.

eZMatrix::removeColumn (   $columnDefinition)

Removess column $columnDefinition from eZMatrix object.

Referenced by removeUselessColumns().

eZMatrix::removeColumnFromCells (   $columnDefinition)
protected

Removess column $columnDefinition from 'cells' member of eZMatrix.

Referenced by removeColumn().

eZMatrix::removeColumnFromMatrix (   $columnDefinition)
protected

Removess column $columnDefinition from 'matrix' member of eZMatrix.

Referenced by removeColumn().

eZMatrix::removeRow (   $rowNum)
eZMatrix::removeUselessColumns (   $matrixColumnDefinition)

Removes columns that are in matrix but not in $matrixColumnDefinition

Returns
true if matrix was modified.

Referenced by adjustColumnsToDefinition().

eZMatrix::reorderColumns ( )
eZMatrix::setColumn (   $colIdx,
  $column 
)

Set column data and definition

Parameters
columnindex
columndata and definition

Referenced by reorderColumns().

eZMatrix::setColumnCellData (   $colIdx,
  $cellData 
)
protected

Set column cell data

Parameters
colIdxcolumn index
cellDatacolumn definition

Referenced by setColumn().

eZMatrix::setColumnDefinition (   $colIdx,
  $columnDefinition 
)
protected

Set column definition.

Parameters
colIdxcolumn index
columnDefinitioncolumn definition

Referenced by setColumn().

eZMatrix::setColumnIndex (   $columnIndex,
  $newColumnIndex 
)

Sets column's index to $newColumnIndex.

Referenced by adjustColumnIndex().

eZMatrix::setColumnName (   $columnIndex,
  $newColumnName 
)

Sets column's name to $newColumnName.

Referenced by adjustColumnName().

eZMatrix::setName (   $name)

Sets the name of the matrix

Referenced by decodeXML().

eZMatrix::updateColumns (   $matrixColumnDefinition)
protected

Searches in matrix columns with identifiers that in $matrixColumnDefinition an a) if column exists and $updateColumnsAttributesAllowed is true then modification of column attributes is performed( index, name, etc.); b) if column doesn't exists and $addNewColumnsAllowed then new column will be created.

Referenced by adjustColumnsToDefinition().

eZMatrix::xmlString ( )

Will return the XML string for this matrix.

Referenced by adjustColumnsToDefinition(), and eZMatrix().

Member Data Documentation

eZMatrix::$Cells

Referenced by attribute().

eZMatrix::$Matrix

Contains the Matrix array.

Referenced by attribute().

eZMatrix::$Name

Contains the Matrix name.

Referenced by attribute(), and name().

eZMatrix::$NumColumns

Contains the number of columns.

Referenced by xmlString().

eZMatrix::$NumRows

Contains the number of rows.

Referenced by xmlString().


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