KWeb  6.4
KWebObject_Translateable Class Reference
Inheritance diagram for KWebObject_Translateable:
KWebObject_Attributable KWebObject KWebItem KWebItem_File KWebItem_Group KWebItem_NewsLetter KWebItem_Right KWebItem_Special KWebItem_User KWebItemInfo KWebItemWithData

Public Member Functions

 getObjectProperties ($data=true, $cache=true, $temp=false)
 Returns object properties as an array.
 initializeObjectData (array $data, $lang=false)
 Initializes object data using data mapping where necessary.
 getMainLanguage ()
 Returns default object's language.
 setMainLanguage ($lang)
 setActiveLanguage ($lang)
 Sets object's active language.
 getActiveLanguage ($useMain=false)
 getLanguage ($lang=false)
 Returns the current object's language, or specified one.
 isMainLanguage ($lang=false)
 Returns true if this is the main language.
 removeTranslation ($lang)
 Removes specified translation.
 getTranslations ()
 getLanguages ()
 Zwraca wszystkie języki - zarówno tłumaczenia jak i oryginał
 getDataAttr ($name, $lang=false)
 setDataAttr ($name, $value, $lang=false, $setChanged=true, $setSql=true)
 getDataValue ($name, $lang=false)
 Returns object's data value The data is first looked up in object's properties, then in $data.
 setDataValue ($name, $value, $lang=false, $setChanged=true, $requestDataUpdate=true)
 Sets object's data value.
 copyDataValue ($id, KWebObject_Attributable $from)
 Copies entire data value, with all translations, from another object.
 isDataChanged ($name, $lang=false)
 setDataChanged ($name, $changed=true, $lang=false)
 Adds specified field to the _changes list.
 isDataTranslated ($name, $lang=false)
 Zwraca true gdy istnieje tłumaczenie dla tego atrybutu.
 isDataTranslateable ($name)
 Zwraca true gdy atrybut może być tłumaczony.
 unsetDataTranslation ($name, $lang=false)
 Czyści tłumaczenie atrybutu - nie robi NIC gdy język nie jest tłumaczeniem!
 requestDataUpdate ($field, $request=true, $lang=false)
 Marks specifield field as updated.
 isDataUpdateRequested ($field, $lang=false)
 Returns true if update was requested for this data.

Static Public Member Functions

static isTranslateable ()

Data Fields

const DATA_TRANSLATIONS = '_trans'

Protected Attributes

 $_trans = array()
 translations [lang] => array( dane )
 $_activeLang

Member Function Documentation

KWebObject_Translateable::copyDataValue ( id,
KWebObject_Attributable from 
)

Copies entire data value, with all translations, from another object.

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::getActiveLanguage ( useMain = false)
KWebObject_Translateable::getDataAttr ( name,
lang = false 
)
KWebObject_Translateable::getDataValue ( name,
lang = false 
)

Returns object's data value The data is first looked up in object's properties, then in $data.

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::getLanguage ( lang = false)

Returns the current object's language, or specified one.

KWebObject_Translateable::getLanguages ( )

Zwraca wszystkie języki - zarówno tłumaczenia jak i oryginał

KWebObject_Translateable::getMainLanguage ( ) [abstract]

Returns default object's language.

Reimplemented in KWebItem.

KWebObject_Translateable::getObjectProperties ( data = true,
cache = true,
temp = false 
)

Returns object properties as an array.

Returns:
array

Reimplemented from KWebObject_Attributable.

Reimplemented in KWebItem.

KWebObject_Translateable::getTranslations ( )
KWebObject_Translateable::initializeObjectData ( array $  data,
lang = false 
)

Initializes object data using data mapping where necessary.

Parameters:
$dataObject's data as $name => $value
$langTranslation language or false for main data

Reimplemented from KWebObject.

Reimplemented in KWebItem.

KWebObject_Translateable::isDataChanged ( name,
lang = false 
)

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::isDataTranslateable ( name)

Zwraca true gdy atrybut może być tłumaczony.

KWebObject_Translateable::isDataTranslated ( name,
lang = false 
)

Zwraca true gdy istnieje tłumaczenie dla tego atrybutu.

KWebObject_Translateable::isDataUpdateRequested ( field,
lang = false 
)

Returns true if update was requested for this data.

Parameters:
$langLanguage of the field - FALSE - active language, TRUE - main language, string - specified language

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::isMainLanguage ( lang = false)

Returns true if this is the main language.

static KWebObject_Translateable::isTranslateable ( ) [static]
KWebObject_Translateable::removeTranslation ( lang)

Removes specified translation.

KWebObject_Translateable::requestDataUpdate ( field,
request = true,
lang = false 
)

Marks specifield field as updated.

It will be stored in the commitUpdates

Parameters:
$langLanguage of the field - FALSE - active language, TRUE - main language, string - specified language

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::setActiveLanguage ( lang)

Sets object's active language.

This language will be returned in getLanguage(), instead of the global one.

KWebObject_Translateable::setDataAttr ( name,
value,
lang = false,
setChanged = true,
setSql = true 
)
KWebObject_Translateable::setDataChanged ( name,
changed = true,
lang = false 
)

Adds specified field to the _changes list.

List of changes is used in the backoffice, to display the list of changes made to the object (specifically, a draft).

This list is NOT used when deciding what to store in the database!

Parameters:
$name
$changed
$lang

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::setDataValue ( name,
value,
lang = false,
setChanged = true,
requestDataUpdate = true 
)

Sets object's data value.

Parameters:
$setChanged- marks this data item in $changed table
$setSqlUpdate- marks this data item for database storage

Reimplemented from KWebObject_Attributable.

KWebObject_Translateable::setMainLanguage ( lang)

Reimplemented in KWebItem.

KWebObject_Translateable::unsetDataTranslation ( name,
lang = false 
)

Czyści tłumaczenie atrybutu - nie robi NIC gdy język nie jest tłumaczeniem!


Field Documentation

KWebObject_Translateable::$_activeLang [protected]
KWebObject_Translateable::$_trans = array() [protected]

translations [lang] => array( dane )


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