Class TableCategory
- TableAccess
- TableCategory
License: GNU General Public License v2.0 only **********************************************************************************************
Class:
TableCategory Diese Klasse dient dazu einen Kategorieobjekt zu erstellen. Eine Kategorieobjekt kann ueber diese Klasse in der Datenbank verwaltet werden
Beside the methods of the parent class there are the following additional methods:
getNewNameIntern($name, $index) - diese rekursive Methode ermittelt fuer den uebergebenen Namen einen eindeutigen Namen dieser bildet sich aus dem Namen in Grossbuchstaben und der naechsten freien Nummer getNumberElements() - number of child recordsets moveSequence($mode) - Kategorie wird um eine Position in der Reihenfolge verschoben
Located at tablecategory.php
Methods summary
public
|
#
__construct(
Constructor that will create an object of a recordset of the table adm_category. If the id is set than the specific category will be loaded. |
public
boolean
|
|
private
string
|
#
getNewNameIntern( string $name, integer $index )
diese rekursive Methode ermittelt fuer den uebergebenen Namen einen eindeutigen Namen dieser bildet sich aus dem Namen in Grossbuchstaben und der naechsten freien Nummer (index) Beispiel: 'Gruppen' => 'GRUPPEN_2' |
public
integer
|
|
public
integer|string|boolean
|
|
public
|
#
moveSequence( string $mode )
Change the internal sequence of this category. It can be moved one place up or down |
public
boolean
|
#
readDataById( integer $cat_id )
Reads a category out of the table in database selected by the unique category id in the table. Per default all columns of adm_categories will be read and stored in the object. |
public
boolean
|
#
readDataByColumns( array $columnArray )
Reads a category out of the table in database selected by different columns in the table. The columns are commited with an array where every element index is the column name and the value is the column value. The columns and values must be selected so that they identify only one record. If the sql will find more than one record the method returns @b false. Per default all columns of adm_categories will be read and stored in the object. |
public
boolean
|
#
save( boolean $updateFingerPrint = true )
Save all changed columns of the recordset in table of database. Therefore the class remembers if it's a new record or if only an update is necessary. The update statement will only update the changed columns. If the table has columns for creator or editor than these column with their timestamp will be updated. If a new record is inserted than the next free sequence will be determined. |
public
boolean
|
Methods inherited from TableAccess
__sleep()
,
clear()
,
connectAdditionalTable()
,
countAllRecords()
,
hasColumnsValueChanged()
,
isNewRecord()
,
readData()
,
setArray()
,
setDatabase()
Properties summary
protected
|
$elementTable
|
|
protected
|
$elementColumn
|
Properties inherited from TableAccess
$additionalTables
,
$columnPrefix
,
$columnsInfos
,
$columnsValueChanged
,
$db
,
$dbColumns
,
$keyColumnName
,
$new_record
,
$tableName