eZPublish  3.8
eZContentClass Class Reference

Handles eZ publish content classes. More...

+ Inheritance diagram for eZContentClass:
+ Collaboration diagram for eZContentClass:

Public Member Functions

 adjustAttributePlacements (&$attributes)
 
 buildContentObjectName (&$contentObjectName, $dataMap, $tmpTags=false)
 
 canInstantiateClasses ()
 
canInstantiateLanguages ()
 
 clone ()
 
 contentObjectName (&$contentObject, $version=false, $translation=false)
 
 create ($userID=false, $optionalValues=array())
 
creator ()
 
dataMap ()
 
 definition ()
 
 exists ($id, $version=EZ_CLASS_VERSION_STATUS_DEFINED, $userID=false, $useIdentifier=false)
 
 eZContentClass ($row)
 
 fetch ($id, $asObject=true, $version=EZ_CLASS_VERSION_STATUS_DEFINED, $user_id=false, $parent_id=null)
 
fetchAllGroups ()
 
fetchAttributeByIdentifier ($identifier, $asObject=true)
 
fetchAttributes ($id=false, $asObject=true, $version=EZ_CLASS_VERSION_STATUS_DEFINED)
 
 fetchByIdentifier ($identifier, $asObject=true, $version=EZ_CLASS_VERSION_STATUS_DEFINED, $user_id=false, $parent_id=null)
 
 fetchByRemoteID ($remoteID, $asObject=true, $version=EZ_CLASS_VERSION_STATUS_DEFINED, $user_id=false, $parent_id=null)
 
fetchGroupIDList ()
 
fetchGroupList ()
 
fetchMatchGroupIDList ()
 
 fetchSearchableAttributes ($id=false, $asObject=true, $version=EZ_CLASS_VERSION_STATUS_DEFINED)
 
 inGroup ($groupID)
 
 initializeCopy (&$originalClass)
 
 instantiate ($userID=false, $sectionID=0, $versionNumber=false, $languageCode=false, $versionStatus=EZ_VERSION_STATUS_INTERNAL_DRAFT)
 
 instantiateIn ($lang, $userID=false, $sectionID=0, $versionNumber=false, $versionStatus=EZ_VERSION_STATUS_INTERNAL_DRAFT)
 
 isRemovable ()
 
modifier ()
 
objectCount ()
 
objectList ()
 
remoteID ()
 
 removableInformation ($includeAll=true)
 
 remove ($removeAttributes=false, $version=EZ_CLASS_VERSION_STATUS_DEFINED)
 
 removeAttributes ($removeAttributes=false, $contentClassID=false, $version=false)
 
 setCanInstantiateLanguages ($languageCodes)
 
 setVersion ($version, $set_childs=false)
 
 store ($store_childs=false, $fieldFilters=null)
 
 storeDefined (&$attributes)
 
 sync ($fieldFilters=null)
 
versionCount ()
 
versionStatus ()
 
- Public Member Functions inherited from eZPersistentObject
attribute ($attr, $noFunction=false)
 
 attributes ()
 
 conditionText (&$conditions)
 
conditionTextByRow (&$conditions, &$row)
 
 definition ()
 
escapeArray (&$array)
 
 eZPersistentObject ($row)
 
 fetchObject (&$def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
 fetchObjectList (&$def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null)
 
 fill (&$row)
 
 getShortAttributeName (&$db, &$def, $attrName)
 
 handleRows (&$rows, $class_name, $asObject)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 newObjectOrder (&$def, $orderField, $conditions)
 
 remove ($conditions=null, $extraConditions=null)
 
 removeObject (&$def, $conditions=null, $extraConditions=null)
 
 reorderObject (&$def, $orderField, $conditions, $down=true)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 swapRow ($table, &$keys, &$order_id, &$rows, $id1, $id2)
 
 sync ($fieldFilters=null)
 
 updateObjectList ($parameters)
 

Static Public Member Functions

canInstantiateClassList ($asObject=false, $includeFilter=true, $groupList=false, $fetchID=false)
 
 fetchList ($version=EZ_CLASS_VERSION_STATUS_DEFINED, $asObject=true, $user_id=false, $sorts=null, $fields=null, $classFilter=false, $limit=null)
 
 removeTemporary ()
 

Private Attributes

 $AllGroups
 
 $CanInstantiateLanguages
 
 $ContentObjectName
 
 $Created
 
 $CreatorID
 
 $ID
 
 $Identifier
 
 $InGroups
 
 $IsContainer
 
 $Modified
 
 $ModifierID
 
 $Name
 
 $Version
 
 $VersionCount
 

Detailed Description

Handles eZ publish content classes.

See Also
eZContentObject

Member Function Documentation

eZContentClass::adjustAttributePlacements ( $attributes)

Referenced by storeDefined().

eZContentClass::buildContentObjectName ( $contentObjectName,
  $dataMap,
  $tmpTags = false 
)

Generates a name for the content object based on the content object name pattern and data map of an object.

Referenced by contentObjectName().

eZContentClass::canInstantiateClasses ( )
& eZContentClass::canInstantiateClassList (   $asObject = false,
  $includeFilter = true,
  $groupList = false,
  $fetchID = false 
)
static

Finds all classes that the current user can create objects from and returns. It is also possible to filter the list event more with $includeFilter and $groupList.

Parameters
$asObjectIf true then it return eZContentClass objects, if not it will be an associative array with name and id keys.
$includeFilterIf true then it will include only from class groups defined in $groupList, if not it will exclude those groups.
$groupListAn array with class group IDs that should be used in filtering, use false if you do not wish to filter at all.
$idA unique name for the current fetch, this must be supplied when filtering is used if you want caching to work.

Referenced by eZContentFunctionCollection\canInstantiateClassList().

& eZContentClass::canInstantiateLanguages ( )
eZContentClass::clone ( )
eZContentClass::contentObjectName ( $contentObject,
  $version = false,
  $translation = false 
)

Will generate a name for the content object based on the class settings for content object.

eZContentClass::create (   $userID = false,
  $optionalValues = array() 
)
& eZContentClass::creator ( )
Returns
The creator of the class as an eZUser object by using the $CreatorID as user ID.
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentClass::dataMap ( )

Returns all attributes as an associative array with the key taken from the attribute identifier.

eZContentClass::exists (   $id,
  $version = EZ_CLASS_VERSION_STATUS_DEFINED,
  $userID = false,
  $useIdentifier = false 
)
eZContentClass::eZContentClass (   $row)
& eZContentClass::fetchAllGroups ( )

Finds all Class groups in the system and returns them.

Returns
An array with eZContentClassGroup objects.
See Also
fetchGroupList(), fetchGroupIDList()
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentClass::fetchAttributeByIdentifier (   $identifier,
  $asObject = true 
)

Fetch class attribute by identifier, return null if none exist.

Parameters
attributeidentifier.
Returns
Class Attribute, null if none matched
eZContentClass::fetchByRemoteID (   $remoteID,
  $asObject = true,
  $version = EZ_CLASS_VERSION_STATUS_DEFINED,
  $user_id = false,
  $parent_id = null 
)
& eZContentClass::fetchGroupIDList ( )

Find all groups the current class is placed in and returns a list of group IDs.

Returns
An array with integers (ids).
See Also
fetchGroupList()
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentClass::fetchGroupList ( )

Find all groups the current class is placed in and returns a list of group objects.

Returns
An array with eZContentClassGroup objects.
See Also
fetchGroupIDList()
Note
The reference for the return value is required to workaround a bug with PHP references.
eZContentClass::fetchList (   $version = EZ_CLASS_VERSION_STATUS_DEFINED,
  $asObject = true,
  $user_id = false,
  $sorts = null,
  $fields = null,
  $classFilter = false,
  $limit = null 
)
static
& eZContentClass::fetchMatchGroupIDList ( )

Returns the result from fetchGroupIDList() if class group overrides is enabled in content.ini.

Returns
An array with eZContentClassGroup objects or false if disabled.
Note
EnableClassGroupOverride in group ContentOverrideSettings from INI file content.ini controls this behaviour.
The reference for the return value is required to workaround a bug with PHP references.
eZContentClass::fetchSearchableAttributes (   $id = false,
  $asObject = true,
  $version = EZ_CLASS_VERSION_STATUS_DEFINED 
)
eZContentClass::inGroup (   $groupID)
Returns
true if the class is part of the group $groupID
eZContentClass::initializeCopy ( $originalClass)

Initializes this class as a copy of $originalClass by creating new a new name and identifier. It will check if there are other classes already with this name in which case it will append a unique number to the name and identifier.

eZContentClass::instantiate (   $userID = false,
  $sectionID = 0,
  $versionNumber = false,
  $languageCode = false,
  $versionStatus = EZ_VERSION_STATUS_INTERNAL_DRAFT 
)

Creates a new content object instance and stores it.

Parameters
userID (optional), current user if not set
sectionID (optional), 0 if not set
versionnumber, create initial version if not set
Note
Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Referenced by instantiateIn().

eZContentClass::instantiateIn (   $lang,
  $userID = false,
  $sectionID = 0,
  $versionNumber = false,
  $versionStatus = EZ_VERSION_STATUS_INTERNAL_DRAFT 
)
eZContentClass::isRemovable ( )

Checks if the class can be removed and returns true if it can, false otherwise.

See Also
removableInformation()

Referenced by remove().

& eZContentClass::modifier ( )
Returns
The modifier of the class as an eZUser object by using the $ModifierID as user ID.
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentClass::objectCount ( )
Returns
will return the number of objects published by this class.
& eZContentClass::objectList ( )
Returns
will return the list of objects published by this class.
& eZContentClass::remoteID ( )

Get remote id of content node

eZContentClass::removableInformation (   $includeAll = true)

Returns information on why the class cannot be removed, it does the same checks as in isRemovable() but generates some text in the return array.

Returns
An array which contains:
  • text - Plain text description why this cannot be removed
  • list - An array with reasons why this failed, each entry contains:
    • text - Plain text description of the reason.
    • list - A sublist of reason (e.g from an attribute), is optional.
Parameters
$includeAllControls whether the returned information will contain all sources for not being to remove or just the first that it finds.

Referenced by isRemovable().

eZContentClass::remove (   $removeAttributes = false,
  $version = EZ_CLASS_VERSION_STATUS_DEFINED 
)
Note
If you want to remove a class with all data associated with it (objects/classMembers) you should use eZContentClassOperations::remove()
eZContentClass::removeAttributes (   $removeAttributes = false,
  $contentClassID = false,
  $version = false 
)
Note
Removes class attributes

Referenced by remove(), and storeDefined().

eZContentClass::removeTemporary ( )
static

Will remove all temporary classes from the database.

eZContentClass::setCanInstantiateLanguages (   $languageCodes)
Returns
Sets the languages which are allowed to be instantiated for the class. Used only for the content/ fetch function.
eZContentClass::setVersion (   $version,
  $set_childs = false 
)

Referenced by storeDefined().

eZContentClass::store (   $store_childs = false,
  $fieldFilters = null 
)

Referenced by sync().

eZContentClass::storeDefined ( $attributes)

Stores the current class as a defined version, updates the contentobject_name attribute and recreates the class group entries.

Note
It will remove any existing temporary or defined classes before storing.
eZContentClass::sync (   $fieldFilters = null)

Referenced by remoteID().

& eZContentClass::versionCount ( )
Deprecated:
Returns
The version count for the class if has been determined.
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentClass::versionStatus ( )
Note
The reference for the return value is required to workaround a bug with PHP references.

Member Data Documentation

eZContentClass::$AllGroups
private

Referenced by fetchAllGroups().

eZContentClass::$CanInstantiateLanguages
private
eZContentClass::$ContentObjectName
private

Referenced by contentObjectName().

eZContentClass::$Created
private
eZContentClass::$CreatorID
private
eZContentClass::$ID
private
eZContentClass::$Identifier
private
eZContentClass::$InGroups
private

Referenced by fetchGroupList().

eZContentClass::$IsContainer
private
eZContentClass::$Modified
private
eZContentClass::$ModifierID
private
eZContentClass::$Name
private
eZContentClass::$Version
private
eZContentClass::$VersionCount
private

Referenced by versionCount().


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