Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class TableCategory

TableAccess
Extended by TableCategory
Copyright: 2004-2016 The Admidio Team
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( Database & $database, integer $cat_id = 0 )

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.

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.

Parameters

$database
Object of the class Database. This should be the default global object @b $gDb.
$cat_id
The recordset of the category with this id will be loaded. If id isn't set than an empty object of the table is created.

Overrides

TableAccess::__construct
public boolean
# delete( )

Deletes the selected record of the table and all references in other tables. After that the class will be initialize. The method throws exceptions if the category couldn't be deleted.

Deletes the selected record of the table and all references in other tables. After that the class will be initialize. The method throws exceptions if the category couldn't be deleted.

Returns

boolean
@b true if no error occurred

Throws

AdmException

SYS_DELETE_SYSTEM_CATEGORY CAT_DONT_DELETE_CATEGORY SYS_DELETE_LAST_CATEGORY

Overrides

TableAccess::delete
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'

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'

Parameters

$name
$index

Returns

string
public integer
# getNumberElements( )

Read number of child recordsets of this category.

Read number of child recordsets of this category.

Returns

integer
Returns the number of child elements of this category
public integer|string|boolean
# getValue( string $columnName, string $format = '' )

Get the value of a column of the database table. If the value was manipulated before with @b setValue than the manipulated value is returned.

Get the value of a column of the database table. If the value was manipulated before with @b setValue than the manipulated value is returned.

Parameters

$columnName
The name of the database column whose value should be read
$format

For date or timestamp columns the format should be the date/time format e.g. @b d.m.Y = '02.04.2011'. @n For text columns the format can be @b database that would return the original database value without any transformations

Returns

integer|string|boolean

Returns the value of the database column. If the value was manipulated before with @b setValue than the manipulated value is returned.

Overrides

TableAccess::getValue
public
# moveSequence( string $mode )

Change the internal sequence of this category. It can be moved one place up or down

Change the internal sequence of this category. It can be moved one place up or down

Parameters

$mode
This could be @b UP or @b 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.

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.

Parameters

$cat_id
Unique cat_id

Returns

boolean
Returns @b true if one record is found

Overrides

TableAccess::readDataById
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.

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.

Parameters

$columnArray
An array where every element index is the column name and the value is the column value

Returns

boolean
Returns @b true if one record is found

Overrides

TableAccess::readDataByColumns
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.

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.

Parameters

$updateFingerPrint
Default @b true. Will update the creator or editor of the recordset if table has columns like @b usr_id_create or @b usr_id_changed

Returns

boolean
If an update or insert into the database was done then return true, otherwise false.

Overrides

TableAccess::save
public boolean
# setValue( string $columnName, mixed $newValue, boolean $checkValue = true )

Set a new value for a column of the database table. The value is only saved in the object. You must call the method @b save to store the new value to the database

Set a new value for a column of the database table. The value is only saved in the object. You must call the method @b save to store the new value to the database

Parameters

$columnName
The name of the database column whose value should get a new value
$newValue
The new value that should be stored in the database field
$checkValue
The value will be checked if it's valid. If set to @b false than the value will not be checked.

Returns

boolean
Returns @b true if the value is stored in the current object and @b false if a check failed

Overrides

TableAccess::setValue

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

Admidio API API documentation generated by ApiGen