Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | List of all members
eZInformationCollection Class Reference

The class eZInformationCollection handles information collected by content objects. More...

Inheritance diagram for eZInformationCollection:

## Public Member Functions
| creator ()
| informationCollectionAttributes ( $asObject=true)
| dataMap ()
| object ()
Public Member Functions inherited from eZPersistentObject
| __construct ( $row=null)
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| store ( $fieldFilters=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | attributeHideList ()
static | removeContentObject ( $delID)
static | removeCollection ( $collectionID)
static | templateForObject ( $object)
static | typeForObject ( $object)
static | allowAnonymous ( $contentObject)
static | userDataHandling ( $contentObject)
static | sendOutEmail ( $contentObject)
static | displayHandling ( $contentObject)
static | redirectURL ( $contentObject)
static | fetch ( $id, $asObject=true)
static | fetchByUserIdentifier ( $userIdentifier, $contentObjectID=false, $asObject=true)
static | fetchCountForAttribute ( $objectAttributeID, $value)
static | fetchCollectionCountForObject ( $objectID)
static | getSortArrayFromParam ( $definition, $sortArray)
static | fetchCollectionsList ( $contentObjectID=false, $creatorID=false, $userIdentifier=false, $limitArray=false, $sortArray=false, $asObject=true)
static | fetchCollectionsCount ( $contentObjectID=false, $creatorID=false, $userIdentifier=false)
static | fetchCountList ( $objectAttributeID)
static | currentUserIdentifier ()
static | generateUserIdentifier (&$user)
static | create ( $contentObjectID, $userIdentifier, $creatorID=false)
static | cleanup ()
static | isCollectingSensitiveData ( $contentObject)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
static | fetchObjectList ( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
static | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Additional Inherited Members
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

The class eZInformationCollection handles information collected by content objects.

Content objects can contain attributes which are able to collect information. The information collected is handled by the eZInformationCollection class.

Definition at line 21 of file ezinformationcollection.php.

## Member Function Documentation

## ◆ allowAnonymous()

static eZInformationCollection::allowAnonymous | ( |  | $contentObject | ) |
| static

Returns
  `true` if anonymous users can submit data to the information collection $contentObject.

Definition at line 197 of file ezinformationcollection.php.

References typeForObject().

## ◆ attributeHideList()

static eZInformationCollection::attributeHideList | ( |  | ) |
| static

Returns
  an array with attribute identifiers that are not to be shown in information collection templates.

Definition at line 73 of file ezinformationcollection.php.

## ◆ cleanup()

static eZInformationCollection::cleanup | ( |  | ) |
| static

Removes all collected information.

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.

Definition at line 718 of file ezinformationcollection.php.

References eZInformationCollectionAttribute\cleanup(), and eZDB\instance().

## ◆ create()

static eZInformationCollection::create | ( |  | $contentObjectID,
|  |  | $userIdentifier,
|  |  | $creatorID = `false`
| ) |  |
| static

Creates a new eZInformationCollection instance.

Definition at line 695 of file ezinformationcollection.php.

References eZUser\currentUser().

## ◆ creator()

eZInformationCollection::creator | ( |  | ) |

Definition at line 591 of file ezinformationcollection.php.

References eZPersistentObject\attribute(), and eZUser\fetch().

## ◆ currentUserIdentifier()

static eZInformationCollection::currentUserIdentifier | ( |  | ) |
| static

Same as generateUserIdentifier but returns the user identifier for the current user.

Definition at line 659 of file ezinformationcollection.php.

References generateUserIdentifier().

## ◆ dataMap()

eZInformationCollection::dataMap | ( |  | ) |

Returns
  an array of attributes of the information collection by identifier.

Fetches information collection attributes and indexes by the content class attribute identifier.

Definition at line 631 of file ezinformationcollection.php.

References informationCollectionAttributes().

## ◆ definition()

static eZInformationCollection::definition | ( |  | ) |
| static

Returns
  the persistent object definition for the eZInformationCollection class.

Reimplemented from eZPersistentObject.

Definition at line 26 of file ezinformationcollection.php.

Referenced by fetch(), fetchByUserIdentifier(), fetchCollectionsCount(), and fetchCollectionsList().

## ◆ displayHandling()

static eZInformationCollection::displayHandling | ( |  | $contentObject | ) |
| static

Definition at line 313 of file ezinformationcollection.php.

References typeForObject().

## ◆ fetch()

static eZInformationCollection::fetch | ( |  | $id,
|  |  | $asObject = `true`
| ) |  |
| static

Fetches the information collection by ID.

Definition at line 386 of file ezinformationcollection.php.

References definition(), and eZPersistentObject\fetchObject().

## ◆ fetchByUserIdentifier()

static eZInformationCollection::fetchByUserIdentifier | ( |  | $userIdentifier,
|  |  | $contentObjectID = `false`,
|  |  | $asObject = `true`
| ) |  |
| static

Fetches the information collection by user identifier.

Definition at line 398 of file ezinformationcollection.php.

References definition(), and eZPersistentObject\fetchObject().

## ◆ fetchCollectionCountForObject()

static eZInformationCollection::fetchCollectionCountForObject | ( |  | $objectID | ) |
| static

Definition at line 429 of file ezinformationcollection.php.

References eZDB\instance().

## ◆ fetchCollectionsCount()

static eZInformationCollection::fetchCollectionsCount | ( |  | $contentObjectID = `false`,
|  |  | $creatorID = `false`,
|  |  | $userIdentifier = `false`
| ) |  |
| static

Parameters

  $creatorID | - optional, default false, the user to fetch collections for
  $contentObjectID | - optional, default false, limits the fetched set of collection to a specific content object

Fetch the number of items limited by the parameters

Definition at line 548 of file ezinformationcollection.php.

References definition(), and eZPersistentObject\fetchObjectList().

## ◆ fetchCollectionsList()

static eZInformationCollection::fetchCollectionsList | ( |  | $contentObjectID = `false`,
|  |  | $creatorID = `false`,
|  |  | $userIdentifier = `false`,
|  |  | $limitArray = `false`,
|  |  | $sortArray = `false`,
|  |  | $asObject = `true`
| ) |  |
| static

Parameters

  $creatorID | - optional, default false, limits the fetched set to a creator_id
  $contentObjectID | - optional, default false, limits the fetched set of collection to a specific content object
  $userIdentifier | - optional, default false, limits the fetched set to a user_identifier
  $limitArray | - optional, default false, limits the number of returned results on the form: array( 'limit' => $limit, 'offset' => $offset )
  $sortArray | - optional, default false, how to sort the result, on the form: array( 'field', true/false ), true = asc
  $asObject | - optional, default true, specifies if results should be returned as objects.

Fetches a list of information collections.

Definition at line 486 of file ezinformationcollection.php.

References eZPersistentObject\count(), definition(), eZPersistentObject\fetchObjectList(), getSortArrayFromParam(), and eZDebug\writeWarning().

## ◆ fetchCountForAttribute()

static eZInformationCollection::fetchCountForAttribute | ( |  | $objectAttributeID,
|  |  | $value
| ) |  |
| static

Definition at line 409 of file ezinformationcollection.php.

References eZDB\instance().

## ◆ fetchCountList()

static eZInformationCollection::fetchCountList | ( |  | $objectAttributeID | ) |
| static

Definition at line 570 of file ezinformationcollection.php.

References eZDB\instance().

## ◆ generateUserIdentifier()

static eZInformationCollection::generateUserIdentifier | ( | & | $user | ) |
| static

Generates a user identifier for the user $user. If $user is `null` then the current user will be used.

The user identifier is either calculated from the unique user ID or the IP address when the user is anonymous.

Definition at line 672 of file ezinformationcollection.php.

References eZUser\currentUser().

Referenced by currentUserIdentifier().

## ◆ getSortArrayFromParam()

static eZInformationCollection::getSortArrayFromParam | ( |  | $definition,
|  |  | $sortArray
| ) |  |
| static

Parameters

  $definition | - required, definition of fields
  $sortArray | - required, the input array

This function converts sorting on the form array ( 'field', true ) to the array( 'field' => true ) and checks if the field exists in the definition. The functions is used to make sorting the same way as done in fetch('content','list', ... )

Definition at line 451 of file ezinformationcollection.php.

References eZPersistentObject\count(), and eZDebug\writeWarning().

Referenced by fetchCollectionsList().

## ◆ informationCollectionAttributes()

eZInformationCollection::informationCollectionAttributes | ( |  | $asObject = `true` | ) |

Definition at line 597 of file ezinformationcollection.php.

References eZDB\instance().

Referenced by dataMap().

## ◆ isCollectingSensitiveData()

static eZInformationCollection::isCollectingSensitiveData | ( |  | $contentObject | ) |
| static

Returns
  `true` if the information collection contains sensitive data.

Definition at line 731 of file ezinformationcollection.php.

References typeForObject().

## ◆ object()

eZInformationCollection::object | ( |  | ) |

Definition at line 651 of file ezinformationcollection.php.

References eZContentObject\fetch().

## ◆ redirectURL()

static eZInformationCollection::redirectURL | ( |  | $contentObject | ) |
| static

Definition at line 349 of file ezinformationcollection.php.

References typeForObject().

## ◆ removeCollection()

static eZInformationCollection::removeCollection | ( |  | $collectionID | ) |
| static

Remove a specific collection

Parameters

  contentobject | id

Definition at line 119 of file ezinformationcollection.php.

References eZDB\instance().

## ◆ removeContentObject()

static eZInformationCollection::removeContentObject | ( |  | $delID | ) |
| static

Remove infomation collection from specified contentobject_id

Parameters

  delID | contentobject id

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.

Definition at line 95 of file ezinformationcollection.php.

References eZDB\instance().

Referenced by eZContentObject\purge().

## ◆ sendOutEmail()

static eZInformationCollection::sendOutEmail | ( |  | $contentObject | ) |
| static

Definition at line 280 of file ezinformationcollection.php.

References typeForObject().

## ◆ templateForObject()

static eZInformationCollection::templateForObject | ( |  | $object | ) |
| static

Returns
  the name of the template to use for viewing a specific information collection.

The template name is determined from the content class type and object attributes. See settings/collect.ini for more information.

Definition at line 141 of file ezinformationcollection.php.

References typeForObject().

## ◆ typeForObject()

static eZInformationCollection::typeForObject | ( |  | $object | ) |
| static

Returns
  the name of the template to use for viewing a specific information collection.

The template name is determined from the content class type and object attributes. See settings/collect.ini for more information.

Definition at line 153 of file ezinformationcollection.php.

Referenced by allowAnonymous(), displayHandling(), isCollectingSensitiveData(), redirectURL(), sendOutEmail(), templateForObject(), and userDataHandling().

## ◆ userDataHandling()

static eZInformationCollection::userDataHandling | ( |  | $contentObject | ) |
| static

Returns
  the type of handling that should be performed on user-data.

Possible return types are:

- multiple
- unique
- overwrite

Definition at line 244 of file ezinformationcollection.php.

References typeForObject().

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

- ezinformationcollection.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.