|
eZ Publish
[4.2]
|
Allows for object persistence in a database. More...
Inherited by eZBasket, eZBinaryFile, eZCollaborationGroup, eZCollaborationItem, eZCollaborationItemGroupLink, eZCollaborationItemMessageLink, eZCollaborationItemParticipantLink, eZCollaborationItemStatus, eZCollaborationNotificationRule, eZCollaborationProfile, eZCollaborationSimpleMessage, eZContentBrowseBookmark, eZContentBrowseRecent, eZContentClass, eZContentClassAttribute, eZContentClassClassGroup, eZContentClassGroup, eZContentClassName, eZContentLanguage, eZContentObject, eZContentObjectAttribute, eZContentObjectState, eZContentObjectStateGroup, eZContentObjectStateGroupLanguage, eZContentObjectStateLanguage, eZContentObjectTreeNode, eZContentObjectVersion, eZDiscountRule, eZDiscountSubRule, eZDiscountSubRuleValue, eZEnumObjectValue, eZEnumValue, eZForgotPassword, eZGeneralDigestUserSettings, eZImageFile, eZInformationCollection, eZInformationCollectionAttribute, eZISBNGroup, eZISBNGroupRange, eZISBNRegistrantRange, eZMedia, eZNodeAssignment, eZNotificationCollection, eZNotificationCollectionItem, eZNotificationEvent, eZOperationMemento, eZOrder, eZOrderItem, eZOrderStatus, eZOrderStatusHistory, eZPathElement, eZPDFExport, eZPolicy, eZPolicyLimitation, eZPolicyLimitationValue, eZProductCategory, eZProductCollection, eZProductCollectionItem, eZProductCollectionItemOption, eZRole, eZRSSExport, eZRSSExportItem, eZRSSImport, eZSection, eZSubtreeNotificationRule, eZTipafriendCounter, eZTipafriendRequest, eZTrigger, eZURL, eZURLAliasML, eZURLObjectLink, eZURLWildcard, eZUser, eZUserAccountKey, eZUserDiscountRule, eZUserSetting, eZVatRule, eZVatType, eZViewCounter, eZWaitUntilDateValue, eZWishList, eZWorkflow, eZWorkflowEvent, eZWorkflowGroup, eZWorkflowGroupLink, and eZWorkflowProcess.
Public Member Functions | |
| attribute ($attr, $noFunction=false) | |
| attributes () | |
| eZPersistentObject ($row) | |
| fill ($row) | |
| hasAttribute ($attr) | |
| hasDirtyData () | |
| remove ($conditions=null, $extraConditions=null) | |
| setAttribute ($attr, $val) | |
| setHasDirtyData ($hasDirtyData) | |
| store ($fieldFilters=null) | |
| sync ($fieldFilters=null) | |
Static Public Member Functions | |
| static | conditionText ($conditions) |
| static | conditionTextByRow ($conditions, $row) |
| static | count ($def, $conds=null, $field=null) |
| static | definition () |
| static | escapeArray ($array) |
| static | fetchObject ($def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null) |
| 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 | getShortAttributeName ($db, $def, $attrName) |
| static | handleRows ($rows, $class_name, $asObject) |
| static | newObjectOrder ($def, $orderField, $conditions) |
| static | removeObject ($def, $conditions=null, $extraConditions=null) |
| static | reorderObject ($def, $orderField, $conditions, $down=true) |
| static | swapRow ($table, $keys, $order_id, $rows, $id1, $id2) |
| static | updateObjectList ($parameters) |
Public Attributes | |
| $PersistentDataDirty | |
| Whether the data is dirty, ie needs to be stored, or not. | |
Static Private Member Functions | |
| static | replaceFieldsWithShortNames ($db, $fieldDefs, &$fields) |
| static | storeObject ($obj, $fieldFilters=null) |
Allows for object persistence in a database.
Classes which stores simple types in databases should inherit from this and implement the definition() function. The class will then get initialization, fetching, listing, moving, storing and deleting for free as well as attribute access. The new class must have a constructor which takes one parameter called $row and pass that this constructor.
class MyClass extends eZPersistentObject { function MyClass( $row ) { $this->eZPersistentObject( $row ); } }
Definition at line 57 of file ezpersistentobject.php.
| eZPersistentObject::attribute | ( | $ | attr, |
| $ | noFunction = false |
||
| ) |
Reimplemented in eZWorkflowEvent.
Definition at line 1196 of file ezpersistentobject.php.
Referenced by eZPolicy\accessArray(), eZRole\accessArray(), eZUser\accessArray(), eZRole\accessArrayByUserID(), eZContentObjectTreeNode\addChild(), eZNotificationCollection\addItem(), eZContentObject\addLocation(), eZContentObjectTreeNode\adjustPathElement(), eZContentObject\allowedAssignSectionList(), eZContentObject\allowedAssignStateIDList(), eZContentObject\allowedAssignStateList(), eZPolicyLimitation\allValues(), eZPolicyLimitation\allValuesAsArrayWithNames(), eZPolicyLimitation\allValuesAsString(), eZContentClassGroup\appendClass(), eZURLWildcard\asArray(), eZContentObject\assignedNodes(), eZContentObject\assignState(), eZContentObjectVersion\assignToNode(), eZRole\assignToUser(), eZProductCollectionItem\calculatePriceWithOptions(), eZUser\canAssignSectionToObject(), eZUser\canAssignToObjectSectionList(), eZSection\canBeRemoved(), eZContentObject\canEdit(), eZOrder\canModifyStatus(), eZContentObject\canTranslate(), eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObjectTreeNode\childrenByName(), eZWaitUntilDateValue\classAttributeName(), eZContentObject\classListFromPolicy(), eZContentObjectTreeNode\classListFromPolicy(), eZWaitUntilDateValue\className(), eZWorkflow\cleanupWorkFlowProcess(), eZContentObjectTreeNode\clearViewCacheForSubtree(), eZNodeAssignment\cloneNodeAssignment(), eZContentObjectAttribute\collectInformation(), eZContentObject\contentActionList(), eZInformationCollectionAttribute\contentClassAttribute(), eZInformationCollectionAttribute\contentObject(), eZContentObjectVersion\contentObject(), eZInformationCollectionAttribute\contentObjectAttribute(), eZPolicyLimitationValue\copy(), eZRole\copy(), eZPolicyLimitation\copy(), eZPolicy\copy(), eZContentObject\copy(), eZRole\copyPolicies(), eZContentObject\copyVersion(), eZPDFExport\countGeneratingOnceExports(), eZVatRule\country(), eZContentObject\createInitialVersion(), eZContentObject\createNewVersion(), eZContentObject\createNodeAssignment(), eZCollaborationItem\createNotificationEvent(), eZBasket\createOrder(), eZRole\createTemporaryVersion(), eZInformationCollection\creator(), eZOrder\currencyCode(), eZContentObject\currentVersion(), eZContentObjectTreeNode\dataMap(), eZPDFExport\exportClassesArray(), eZNotificationEvent\eZNotificationEvent(), eZUser\failedLoginAttempts(), eZTrigger\fetchAllowedWorkflows(), eZContentObject\fetchClassAttributes(), eZContentObject\fetchDataMap(), eZContentClass\fetchGroupIDList(), eZContentClass\fetchGroupList(), eZRSSExport\fetchImageURL(), eZContentClass\fetchMatchGroupIDList(), eZContentBrowseBookmark\fetchNode(), eZContentBrowseRecent\fetchNode(), eZContentObjectTreeNode\fetchParent(), eZContentObjectTreeNode\fetchPath(), eZRSSExport\fetchRSS1_0(), eZRSSExport\fetchRSS2_0(), eZPDFExport\filepath(), eZUser\generateAccessArray(), eZContentObjectTreeNode\getName(), eZNodeAssignment\getParentNode(), eZNodeAssignment\getParentObject(), eZUser\groups(), eZCollaborationItem\handler(), eZContentObjectVersion\hasConflicts(), eZUser\hasStoredLogin(), eZContentObjectTreeNode\hideSubTree(), eZRSSImport\importDescription(), eZViewCounter\increase(), eZContentClass\inGroup(), eZWorkflow\ingroupIDList(), eZWorkflow\ingroupList(), eZContentClassAttribute\initializeObjectAttributes(), eZContentClassAttribute\instantiate(), eZContentClass\instantiate(), eZContentClassAttribute\instantiateTemporary(), eZContentObject\isAlwaysAvailable(), eZUser\isAnonymous(), eZUser\isEnabled(), eZUser\isLocked(), eZContentObjectStateGroupLanguage\isValid(), eZContentObjectStateLanguage\isValid(), eZNotificationCollection\itemCount(), eZNotificationCollection\items(), eZBasket\itemsInfo(), eZNotificationCollection\itemsToSend(), eZContentObjectVersion\languageMask(), eZPolicyLimitation\limitArray(), eZPolicy\limitationList(), eZUser\limitList(), eZOperationMemento\mainMemento(), eZContentObject\mainNode(), eZContentObject\mainNodeID(), eZContentObjectVersion\mainParentNodeID(), eZBinaryFile\mimeTypeCategory(), eZMedia\mimeTypeCategory(), eZBinaryFile\mimeTypePart(), eZMedia\mimeTypePart(), eZContentObjectVersion\name(), eZContentObject\name(), eZContentObject\names(), eZSubtreeNotificationRule\node(), eZContentObjectVersion\nodeAssignments(), eZContentObjectVersion\nonTranslatableAttributesToUpdate(), eZContentObjectTreeNode\object(), eZProductCollectionItem\optionList(), eZOrder\orderItems(), eZContentObjectTrashNode\originalParent(), eZContentObjectTrashNode\originalParentPathIdentificationString(), eZWorkflowProcess\parameterList(), eZContentObjectVersion\parentNodes(), eZContentObjectTreeNode\pathArray(), eZContentObjectTreeNode\pathWithNames(), eZPolicyLimitation\policy(), eZRole\policyList(), eZOrderItem\priceExVAT(), eZOrderItem\priceIncVAT(), eZVatRule\productCategoriesIDs(), eZVatRule\productCategoriesNames(), eZVatRule\productCategoriesString(), eZOrder\productCollection(), eZBasket\productCollection(), eZNodeAssignment\purge(), eZContentObject\purge(), eZContentObjectVersion\relatedContentObjectArray(), eZContentObjectTreeNode\remoteID(), eZContentObject\remoteID(), eZContentClass\remoteID(), eZContentClass\removableInformation(), remove(), eZPDFExport\remove(), eZContentObjectVersion\removeAssignment(), eZOrder\removeCollection(), eZBasket\removeItem(), eZContentObjectTreeNode\removeNodeFromTree(), eZRole\removePolicies(), eZContentObject\removeReverseRelations(), eZProductCollectionItem\removeThis(), eZPolicyLimitation\removeThis(), eZPolicy\removeThis(), eZContentClassAttribute\removeThis(), eZRole\removeThis(), eZWorkflowProcess\removeThis(), eZContentObjectVersion\removeThis(), eZContentObject\removeThis(), eZContentObjectTreeNode\removeThis(), eZContentObjectVersion\removeTranslation(), eZContentClass\removeTranslation(), eZContentObject\removeTranslation(), eZContentObject\rename(), eZContentObjectVersion\reverseRelatedObjectList(), eZRole\revertFromTemporaryVersion(), eZUser\roleIDList(), eZUser\roles(), eZRSSExport\rssXml(), eZWorkflowProcess\run(), eZContentObjectVersion\serialize(), eZContentObject\serialize(), eZContentObjectTreeNode\serialize(), eZContentClass\setAlwaysAvailableLanguageID(), eZContentObjectVersion\setAlwaysAvailableLanguageID(), eZContentObject\setAlwaysAvailableLanguageID(), eZCollaborationItem\setIsActive(), eZCollaborationItem\setLastRead(), eZContentObject\setName(), eZContentClass\setName(), eZWorkflowProcess\setParameters(), eZContentObjectTreeNode\sortArray(), eZContentObjectStateGroup\stateByIdentifier(), eZOrder\statusModificationList(), eZPDFExport\store(), eZRSSExport\store(), eZVatRule\store(), eZUser\store(), eZContentClassAttribute\store(), eZContentObjectVersion\store(), eZContentClassAttribute\storeDefined(), eZContentClass\storeDefined(), eZBinaryFile\storedFileInfo(), eZMedia\storedFileInfo(), eZContentObjectTrashNode\storeToTrash(), eZContentObjectTreeNode\subTree(), eZContentObjectTreeNode\subTreeCount(), eZContentObjectTreeNode\subtreeSoleNodeCount(), eZContentObjectVersion\tempMainNode(), eZNodeAssignment\tempNode(), eZContentObjectAttribute\translateTo(), eZBasket\type(), eZContentObjectTreeNode\unhideSubTree(), eZContentObjectVersion\unpublish(), eZContentObjectTreeNode\updateAndStoreModified(), eZContentObjectTreeNode\updatePathIdentificationString(), eZBasket\updatePrices(), eZContentObjectTreeNode\updateSubTreePath(), eZCollaborationNotificationRule\user(), eZPolicyLimitation\valueList(), eZVatRule\vatTypeName(), eZVatRule\vatTypeObject(), eZProductCollectionItem\verify(), eZContentObject\versionLanguageName(), eZContentObjectVersion\versionName(), and eZContentObjectTreeNode\viewCount().
| eZPersistentObject::attributes | ( | ) |
Reimplemented in eZWorkflowEvent.
Definition at line 1167 of file ezpersistentobject.php.
Referenced by eZWorkflowEvent\attributes().
| static eZPersistentObject::conditionText | ( | $ | conditions | ) | [static] |
Calls conditionTextByRow with an empty row and $conditions.
Definition at line 561 of file ezpersistentobject.php.
Referenced by fetchObjectList(), newObjectOrder(), removeObject(), and storeObject().
| static eZPersistentObject::conditionTextByRow | ( | $ | conditions, |
| $ | row | ||
| ) | [static] |
Generates an SQL sentence from the conditions $conditions and row data $row. If $row is empty (null) it uses the condition data instead of row data.
Definition at line 570 of file ezpersistentobject.php.
Referenced by conditionText(), and reorderObject().
| static eZPersistentObject::count | ( | $ | def, |
| $ | conds = null, |
||
| $ | field = null |
||
| ) | [static] |
Fetches the number of rows by using the object definition. Uses fetchObjectList for the actual SQL handling.
See fetchObjectList() for a full description of the input parameters.
Definition at line 154 of file ezpersistentobject.php.
Referenced by eZUser\_loginUser(), eZContentLanguage\addLanguage(), eZContentObjectTreeNode\adjustPathElement(), eZContentObject\allowedAssignStateIDList(), eZPolicyLimitation\allValuesAsArrayWithNames(), eZContentObject\appendInputRelationList(), eZRole\appendPolicy(), eZContentObjectTreeNode\assignSectionToSubTree(), eZRole\assignToUser(), eZProductCollectionItem\calculatePriceWithOptions(), eZContentObjectTreeNode\calendar(), eZUser\canAssignSectionList(), eZUser\canAssignSectionToClassList(), eZUser\canAssignToObjectSectionList(), eZSection\canBeRemoved(), eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObject\checkGroupLimitationAccess(), eZSubtreeNotificationRule\checkObjectAccess(), eZUser\checkUser(), eZContentClassClassGroup\classInGroup(), eZContentObject\className(), eZWishList\cleanup(), eZBasket\cleanup(), eZOrder\cleanup(), eZRole\cleanupByNode(), eZBasket\cleanupExpired(), eZProductCollectionItem\cleanupList(), eZOrder\cleanupOrder(), eZContentObject\clearCache(), eZContentObjectTreeNode\clearViewCacheForSubtree(), conditionTextByRow(), eZContentObject\contentActionList(), eZContentObjectTreeNode\createAttributeFilterSQLStrings(), eZContentObjectTreeNode\createClassFilteringSQLString(), eZContentObjectTreeNode\createExtendedAttributeFilterSQLStrings(), eZContentBrowseRecent\createNew(), eZContentObject\createNewVersion(), eZContentObjectTreeNode\createNodesConditionSQLStringFromPath(), eZUser\createPassword(), eZContentObjectTreeNode\createPathConditionAndNotEqParentSQLStrings(), eZContentObjectTreeNode\createPermissionCheckingSQL(), eZContentObjectTreeNode\createSortingSQLStrings(), eZURLWildcard\createWildcardsIndex(), eZBasket\currentBasket(), eZWishList\currentWishList(), eZOrder\customerList(), eZRSSImport\destinationPath(), eZContentObject\exists(), eZContentClass\exists(), eZISBNGroupRange\extractGroup(), eZISBNRegistrantRange\extractRegistrant(), eZUser\failedLoginAttemptsByUserID(), eZContentObject\fetch(), eZContentClass\fetch(), eZContentObjectTreeNode\fetch(), eZContentObjectTreeNode\fetchAliasesFromNodeList(), eZUser\fetchAnonymousCount(), eZContentClass\fetchAttributeByIdentifier(), eZContentObject\fetchAttributesByIdentifier(), eZURLAliasML\fetchByAction(), eZISBNGroup\fetchByGroup(), eZContentObjectState\fetchById(), eZContentObjectStateGroup\fetchById(), eZContentObjectStateGroup\fetchByIdentifier(), eZContentObjectState\fetchByIdentifier(), eZContentClass\fetchByIdentifier(), eZContentObject\fetchByNodeID(), eZURLAliasML\fetchByPath(), eZContentObject\fetchByRemoteID(), eZContentClass\fetchByRemoteID(), eZRole\fetchByUser(), eZInformationCollection\fetchCollectionsList(), eZWorkflow\fetchEventIndexed(), eZImageFile\fetchImageAttributesByFilepath(), eZContentClassName\fetchList(), eZCollaborationItem\fetchListTool(), eZUser\fetchLoggedInCount(), eZUser\fetchLoggedInList(), eZContentObjectTreeNode\fetchNode(), eZURLAliasML\fetchNodeIDByPath(), eZRSSExportItem\fetchNodeList(), fetchObjectList(), eZURLAliasML\fetchPathByActionList(), eZRSSExport\fetchRSS1_0(), eZRSSExport\fetchRSS2_0(), eZUser\fetchUserClassList(), eZContentObjectVersion\fetchUserDraft(), eZUser\fetchUserGroupClassNames(), eZSubtreeNotificationRule\fetchUserList(), eZContentObject\fillNodeListAttributes(), eZPolicyLimitation\findByType(), eZContentObjectTreeNode\findMainNode(), eZContentObjectTreeNode\findMainNodeArray(), eZContentObjectTreeNode\findNode(), eZURLAliasML\findUniqueText(), eZContentObject\fixReverseRelations(), eZUser\generateAccessArray(), eZRSSExportItem\getAttributeMappings(), eZContentObjectTreeNode\getName(), eZPathElement\getPath(), eZURLAliasML\getPath(), eZPathElement\getPathArray(), eZInformationCollection\getSortArrayFromParam(), eZLDAPUser\goAndPublishGroups(), eZUser\groups(), eZURL\handleList(), eZUser\hasAccessToView(), eZContentObjectVersion\hasConflicts(), eZContentObject\hasRemainingVersions(), eZUser\hasStoredLogin(), eZRSSExport\imagePath(), eZUser\instance(), eZBasket\isEmpty(), eZContentClass\isRemovable(), eZUser\isUserLoggedIn(), eZURLAliasML\languageScore(), eZUser\lastVisit(), eZUser\loginCount(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), eZContentObjectTreeNode\move(), newObjectOrder(), eZOrder\orderInfo(), eZOrder\orderStatistics(), eZOrder\orderTotalExVAT(), eZOrder\orderTotalIncVAT(), eZContentObjectTrashNode\originalParent(), eZContentObjectTreeNode\pathWithNames(), eZContentObject\previousVersion(), eZContentLanguage\prioritizedLanguagesByLocaleList(), eZOrder\productList(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), eZContentObject\purge(), eZNodeAssignment\purgeByID(), eZURL\registerURL(), eZContentObject\relatedObjectCount(), eZContentObject\remoteID(), eZContentClass\removableInformation(), eZNodeAssignment\removeByID(), eZURLWildcard\removeByIDs(), eZPolicyLimitationValue\removeByValue(), eZContentObjectTreeNode\removeNodeFromTree(), eZRole\removePolicy(), eZContentObject\removeReverseRelations(), eZURLAliasML\removeSingleEntry(), eZContentObjectStateGroup\removeStatesByID(), eZContentObjectTreeNode\removeSubtrees(), eZContentObject\removeThis(), eZUser\removeUser(), eZContentObjectVersion\removeVersions(), eZContentObject\rename(), reorderObject(), eZVatType\resetToDefaultInProducts(), eZURLAliasML\reverseTranslate(), eZTrigger\runTrigger(), eZContentObjectVersion\serialize(), eZUser\setFailedLoginAttempts(), eZNodeAssignment\setNewMainAssignment(), eZRSSExportItem\sourcePath(), eZContentLanguage\sqlFilter(), eZOrder\statusModificationList(), eZContentObjectState\store(), eZContentClass\storeDefined(), storeObject(), eZURLAliasML\storePath(), eZCollaborationGroup\subTree(), eZContentObjectTreeNode\subTreeByNodeID(), eZContentObjectTreeNode\subTreeCountByNodeID(), eZContentObjectTreeNode\subTreeMultiPaths(), eZContentObjectTreeNode\subtreeSoleNodeCount(), eZContentObjectVersion\tempMainNode(), eZContentLanguage\topPriorityLanguageByLocaleList(), eZURLAliasML\translate(), eZBasket\type(), eZContentObjectVersion\unpublish(), eZContentObjectVersion\unserialize(), eZContentObjectTreeNode\updateAndStoreModified(), eZUser\updateLastVisit(), eZContentObjectTreeNode\updateSubTreePath(), eZURL\url(), eZURL\urlByMD5(), eZURL\urlByURL(), and eZContentObject\versionLanguageName().
| static eZPersistentObject::definition | ( | ) | [static] |
The definition array is an associative array consists of these keys:
asc or desc.Example:
static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }
Reimplemented in eZURLAliasML, eZContentObject, eZContentObjectTreeNode, eZOrderStatus, eZURLWildcard, eZRole, eZOrderStatusHistory, eZUser, eZNodeAssignment, eZContentClass, eZCollaborationItemParticipantLink, eZContentBrowseBookmark, eZISBNRegistrantRange, eZContentBrowseRecent, eZPathElement, eZISBNGroupRange, eZContentObjectVersion, eZISBNGroup, eZTrigger, eZPDFExport, eZContentObjectAttribute, eZWorkflow, eZContentClassAttribute, eZGeneralDigestUserSettings, eZBasket, eZCollaborationItem, eZRSSExport, eZRSSImport, eZNotificationEvent, eZWaitUntilDateValue, eZPolicy, eZRSSExportItem, eZEnumValue, eZURLObjectLink, eZForgotPassword, eZUserAccountKey, eZOrder, eZOrderItem, eZPolicyLimitation, eZPolicyLimitationValue, eZSection, eZOperationMemento, eZEnumObjectValue, eZCollaborationGroup, eZCollaborationItemGroupLink, eZCollaborationItemMessageLink, eZCollaborationItemStatus, eZCollaborationProfile, eZCollaborationSimpleMessage, eZContentObjectTrashNode, eZDiscountRule, eZDiscountSubRule, eZUserDiscountRule, eZWishList, eZNotificationCollectionItem, eZURL, eZDiscountSubRuleValue, eZInformationCollection, eZTipafriendRequest, eZNotificationCollection, eZCollaborationNotificationRule, eZSubtreeNotificationRule, eZContentLanguage, eZInformationCollectionAttribute, eZProductCollectionItem, eZBinaryFile, eZImageFile, eZMedia, eZProductCollectionItemOption, eZVatRule, eZVatType, eZWorkflowEvent, eZWorkflowGroup, eZWorkflowProcess, eZUserSetting, eZContentClassClassGroup, eZContentClassGroup, eZTipafriendCounter, eZViewCounter, eZWorkflowGroupLink, eZProductCategory, eZProductCollection, eZContentClassName, eZContentObjectStateGroup, eZContentObjectStateGroupLanguage, eZContentObjectStateLanguage, and eZContentObjectState.
Definition at line 1057 of file ezpersistentobject.php.
Referenced by attribute(), attributes(), fill(), hasAttribute(), remove(), and setAttribute().
| static eZPersistentObject::escapeArray | ( | $ | array | ) | [static] |
Definition at line 1062 of file ezpersistentobject.php.
| eZPersistentObject::eZPersistentObject | ( | $ | row | ) |
Initializes the object with the row $row. It will try to set each field taken from the database row. Calls fill to do the job. If the parameter $row is an integer it will try to fetch it from the database using it as the unique ID.
Definition at line 65 of file ezpersistentobject.php.
Referenced by eZContentObjectState\__construct(), eZContentObjectStateGroupLanguage\__construct(), eZContentObjectStateLanguage\__construct(), eZContentObjectStateGroup\__construct(), eZBasket\eZBasket(), eZBinaryFile\eZBinaryFile(), eZCollaborationGroup\eZCollaborationGroup(), eZCollaborationItem\eZCollaborationItem(), eZCollaborationItemGroupLink\eZCollaborationItemGroupLink(), eZCollaborationItemMessageLink\eZCollaborationItemMessageLink(), eZCollaborationItemParticipantLink\eZCollaborationItemParticipantLink(), eZCollaborationItemStatus\eZCollaborationItemStatus(), eZCollaborationNotificationRule\eZCollaborationNotificationRule(), eZCollaborationProfile\eZCollaborationProfile(), eZCollaborationSimpleMessage\eZCollaborationSimpleMessage(), eZContentBrowseBookmark\eZContentBrowseBookmark(), eZContentBrowseRecent\eZContentBrowseRecent(), eZContentClass\eZContentClass(), eZContentClassAttribute\eZContentClassAttribute(), eZContentClassClassGroup\eZContentClassClassGroup(), eZContentClassGroup\eZContentClassGroup(), eZContentClassName\eZContentClassName(), eZContentLanguage\eZContentLanguage(), eZContentObject\eZContentObject(), eZContentObjectAttribute\eZContentObjectAttribute(), eZContentObjectTrashNode\eZContentObjectTrashNode(), eZContentObjectTreeNode\eZContentObjectTreeNode(), eZContentObjectVersion\eZContentObjectVersion(), eZDiscountRule\eZDiscountRule(), eZDiscountSubRule\eZDiscountSubRule(), eZDiscountSubRuleValue\eZDiscountSubRuleValue(), eZEnumObjectValue\eZEnumObjectValue(), eZEnumValue\eZEnumValue(), eZForgotPassword\eZForgotPassword(), eZGeneralDigestUserSettings\eZGeneralDigestUserSettings(), eZImageFile\eZImageFile(), eZInformationCollection\eZInformationCollection(), eZInformationCollectionAttribute\eZInformationCollectionAttribute(), eZISBNGroup\eZISBNGroup(), eZISBNGroupRange\eZISBNGroupRange(), eZISBNRegistrantRange\eZISBNRegistrantRange(), eZMedia\eZMedia(), eZNodeAssignment\eZNodeAssignment(), eZNotificationCollection\eZNotificationCollection(), eZNotificationCollectionItem\eZNotificationCollectionItem(), eZNotificationEvent\eZNotificationEvent(), eZOperationMemento\eZOperationMemento(), eZOrder\eZOrder(), eZOrderItem\eZOrderItem(), eZOrderStatus\eZOrderStatus(), eZOrderStatusHistory\eZOrderStatusHistory(), eZPathElement\eZPathElement(), eZPDFExport\eZPDFExport(), eZPolicy\eZPolicy(), eZPolicyLimitation\eZPolicyLimitation(), eZPolicyLimitationValue\eZPolicyLimitationValue(), eZProductCategory\eZProductCategory(), eZProductCollection\eZProductCollection(), eZProductCollectionItem\eZProductCollectionItem(), eZProductCollectionItemOption\eZProductCollectionItemOption(), eZRole\eZRole(), eZRSSExport\eZRSSExport(), eZRSSExportItem\eZRSSExportItem(), eZRSSImport\eZRSSImport(), eZSection\eZSection(), eZSubtreeNotificationRule\eZSubtreeNotificationRule(), eZTipafriendCounter\eZTipafriendCounter(), eZTipafriendRequest\eZTipafriendRequest(), eZTrigger\eZTrigger(), eZURL\eZURL(), eZURLAliasML\eZURLAliasML(), eZURLObjectLink\eZURLObjectLink(), eZURLWildcard\eZURLWildcard(), eZUser\eZUser(), eZUserAccountKey\eZUserAccountKey(), eZUserDiscountRule\eZUserDiscountRule(), eZUserSetting\eZUserSetting(), eZVatRule\eZVatRule(), eZVatType\eZVatType(), eZViewCounter\eZViewCounter(), eZWaitUntilDateValue\eZWaitUntilDateValue(), eZWishList\eZWishList(), eZWorkflow\eZWorkflow(), eZWorkflowEvent\eZWorkflowEvent(), eZWorkflowGroup\eZWorkflowGroup(), eZWorkflowGroupLink\eZWorkflowGroupLink(), and eZWorkflowProcess\eZWorkflowProcess().
| static eZPersistentObject::fetchObject | ( | $ | def, |
| $ | field_filters, | ||
| $ | conds, | ||
| $ | asObject = true, |
||
| $ | grouping = null, |
||
| $ | custom_fields = null |
||
| ) | [static] |
Creates an SQL query out of the different parameters and returns an object with the result. If $asObject is true the returned item is an object otherwise a db row. Uses fetchObjectList for the actual SQL handling and just returns the first row item.
See fetchObjectList() for a full description of the input parameters.
| def | The definition structure |
| field_filters | If defined determines the fields which are extracted, if not all fields are fetched |
| conds | An array of conditions which determines which rows are fetched |
| grouping | An array of elements to group by |
| custom_fields | An array of extra fields to fetch, each field may be a SQL operation |
Definition at line 172 of file ezpersistentobject.php.
Referenced by eZContentObjectAttribute\cloneContentObjectAttribute(), eZProductCategory\fetch(), eZDiscountRule\fetch(), eZSection\fetch(), eZOperationMemento\fetch(), eZVatRule\fetch(), eZUserDiscountRule\fetch(), eZURLObjectLink\fetch(), eZWorkflowGroup\fetch(), eZUserSetting\fetch(), eZCollaborationProfile\fetch(), eZTipafriendCounter\fetch(), eZContentBrowseBookmark\fetch(), eZDiscountSubRule\fetch(), eZContentBrowseRecent\fetch(), eZViewCounter\fetch(), eZVatType\fetch(), eZCollaborationItemStatus\fetch(), eZWorkflowGroupLink\fetch(), eZProductCollection\fetch(), eZEnumObjectValue\fetch(), eZTrigger\fetch(), eZBinaryFile\fetch(), eZCollaborationItemGroupLink\fetch(), eZEnumValue\fetch(), eZCollaborationSimpleMessage\fetch(), eZOrderStatus\fetch(), eZProductCollectionItem\fetch(), eZContentClassGroup\fetch(), eZContentClassClassGroup\fetch(), eZCollaborationItemMessageLink\fetch(), eZCollaborationItemParticipantLink\fetch(), eZWorkflowEvent\fetch(), eZContentObjectAttribute\fetch(), eZWaitUntilDateValue\fetch(), eZOrderStatusHistory\fetch(), eZCollaborationItem\fetch(), eZMedia\fetch(), eZContentObjectVersion\fetch(), eZCollaborationGroup\fetch(), eZNotificationEvent\fetch(), eZURLWildcard\fetch(), eZOrder\fetch(), eZRSSExportItem\fetch(), eZRSSImport\fetch(), eZPDFExport\fetch(), eZURL\fetch(), eZRSSExport\fetch(), eZUser\fetch(), eZBasket\fetch(), eZContentClassAttribute\fetch(), eZWorkflow\fetch(), eZPolicy\fetch(), eZNodeAssignment\fetch(), eZInformationCollection\fetch(), eZWorkflowProcess\fetch(), eZRole\fetch(), eZContentObjectAttribute\fetchByClassAttributeID(), eZUser\fetchByEmail(), eZBinaryFile\fetchByFileName(), eZMedia\fetchByFileName(), eZImageFile\fetchByFilepath(), eZNodeAssignment\fetchByID(), eZPolicyLimitation\fetchByIdentifier(), eZContentObjectAttribute\fetchByIdentifier(), eZUserAccountKey\fetchByKey(), eZForgotPassword\fetchByKey(), eZProductCategory\fetchByName(), eZContentClassGroup\fetchByName(), eZRSSExport\fetchByName(), eZUser\fetchByName(), eZRole\fetchByName(), eZInformationCollectionAttribute\fetchByObjectAttributeID(), eZURLWildcard\fetchBySourceURL(), eZOrderStatus\fetchByStatus(), eZCollaborationProfile\fetchByUser(), eZInformationCollection\fetchByUserIdentifier(), eZOperationMemento\fetchChild(), eZNotificationCollection\fetchForHandler(), eZGeneralDigestUserSettings\fetchForUser(), eZOperationMemento\fetchMain(), importRSSItem(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZContentObjectAttribute\language(), eZNodeAssignment\remove(), eZPolicy\role(), eZTrigger\runTrigger(), and eZContentObjectTreeNode\unserialize().
| static eZPersistentObject::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] |
Creates an SQL query out of the different parameters and returns an array with the result. If $asObject is true the array contains objects otherwise a db row.
| $def | A definition array of all fields, table name and sorting |
| $field_filters | If defined determines the fields which are extracted (array of field names), if not all fields are fetched |
| $conds | null for no special condition or an associative array of fields to filter on. Syntax is FIELD => CONDITION, CONDITION can be one of:
|
| $sorts | An associative array of sorting conditions, if set to false ignores settings in $def, if set to null uses settingss in $def. Syntax is FIELD => DIRECTION. DIRECTION must either be string 'asc' for ascending or 'desc' for descending. |
| $limit | An associative array with limitiations, can contain
|
| $asObject | If true then it will return an array with objects, objects are created from class defined in $def. If false it will just return the rows fetch from database. |
| $grouping | An array of fields to group by or null to use grouping in defintion $def. |
| $custom_fields | Array of FIELD elements to add to SQL, can be used to perform custom fetches, e.g counts. FIELD is an associative array containing:
|
| $custom_tables | Array of additional tables. |
| $custom_conds | String with sql conditions for 'WHERE' clause. |
A full example:
$filter = array( 'id', 'name' ); $conds = array( 'type' => 5, 'size' => array( false, array( 200, 500 ) ) ); $sorts = array( 'name' => 'asc' ); $limit = array( 'offset' => 50, 'length' => 10 ); eZPersistentObject::fetchObjectList( $def, $filter, $conds, $sorts, $limit, true, false, null )
Counting number of elements.
$custom = array( array( 'operation' => 'count( id )', 'name' => 'count' ) ); // Here $field_filters is set to an empty array, that way only count is used in fields $rows = eZPersistentObject::fetchObjectList( $def, array(), null, null, null, false, false, $custom ); return $rows[0]['count'];
Counting elements per type using grouping
$custom = array( array( 'operation' => 'count( id )', 'name' => 'count' ) ); $group = array( 'type' ); $rows = eZPersistentObject::fetchObjectList( $def, array(), null, null, null, false, $group, $custom ); return $rows[0]['count'];
Example to fetch a result with custom conditions. The following example will fetch the attributes to the contentobject with id 1 and add the contentobject.name in each attribute row with the array key contentobject_name.
$objectDef = eZContentObject::definition(); $objectAttributeDef = eZContentObjectAttribute::definition(); $fields = array(); $conds = array( $objectDef['name'] . '.id' => 1 ); $sorts = array( $objectAttributeDef['name'] . '.sort_key_string' => 'asc' ); $limit = null; $asObject = false; $group = false; $customFields = array( $objectAttributeDef['name'] . '.*', array( 'operation' => $objectDef['name'] . '.name', 'name' => 'contentobject_name' ) ); $customTables = array( $objectDef['name'] ); $languageCode = 'eng-GB'; $customConds = ' AND ' . $objectDef['name'] . '.current_version=' . $objectAttributeDef['name'] . '.version' . ' AND ' . $objectDef['name'] . '.id=' . $objectAttributeDef['name'] . '.contentobject_id' . ' AND ' . $objectAttributeDef['name'] . '.language_code=\'' . $languageCode . '\''; $rows = eZPersistentObject::fetchObjectList( $objectAttributeDef, $fields, $conds, $sorts, $limit, $asObject, $group, $customFields, $customTables, $customConds );
Definition at line 743 of file ezpersistentobject.php.
Referenced by eZOrder\active(), eZOrder\activeByUserID(), eZContentObject\allContentObjectAttributes(), eZMultiplexerType\attribute(), eZSection\canBeRemoved(), eZSSLZone\checkNodeID(), eZSSLZone\checkObject(), eZContentClassClassGroup\classInGroup(), eZURLObjectLink\clearCacheForObjectLink(), count(), eZPDFExport\countGeneratingOnceExports(), eZContentBrowseRecent\createNew(), eZBasket\currentBasket(), eZWishList\currentWishList(), eZContentObjectState\defaults(), eZContentClass\exists(), eZISBNGroupRange\extractGroup(), eZISBNRegistrantRange\extractRegistrant(), eZBinaryFile\fetch(), eZMedia\fetch(), eZContentClass\fetch(), eZRSSImport\fetchActiveList(), eZUserSetting\fetchAll(), eZEnumObjectValue\fetchAllElements(), eZEnumValue\fetchAllElements(), eZWaitUntilDateValue\fetchAllElements(), eZContentObjectAttribute\fetchAttributeTranslations(), eZMedia\fetchByContentObjectID(), eZContentObjectTreeNode\fetchByContentObjectID(), eZNotificationCollectionItem\fetchByDate(), eZBinaryFile\fetchByFileName(), eZMedia\fetchByFileName(), eZContentObjectStateGroupLanguage\fetchByGroup(), eZISBNGroup\fetchByGroup(), eZContentClass\fetchByIdentifier(), eZSection\fetchByOffset(), eZRole\fetchByOffset(), eZPolicyLimitation\fetchByPolicyID(), eZContentClass\fetchByRemoteID(), eZDiscountSubRule\fetchByRuleID(), eZUserDiscountRule\fetchByRuleID(), eZContentObjectStateLanguage\fetchByState(), eZDiscountSubRuleValue\fetchBySubRuleID(), eZUserDiscountRule\fetchByUserID(), eZVatRule\fetchByVatType(), eZContentClassClassGroup\fetchClassListByGroups(), eZInformationCollection\fetchCollectionsCount(), eZInformationCollection\fetchCollectionsList(), eZVatRule\fetchCountByVatType(), eZNotificationCollectionItem\fetchCountForEvent(), eZWorkflow\fetchEventCount(), eZWorkflow\fetchEventCountByWorkflowID(), eZWorkflow\fetchEventIndexed(), eZContentObjectVersion\fetchFiltered(), eZSection\fetchFilteredList(), eZWorkflowEvent\fetchFilteredList(), eZRSSExportItem\fetchFilteredList(), eZContentClassAttribute\fetchFilteredList(), eZContentObject\fetchFilteredList(), eZWorkflowProcess\fetchForContent(), eZImageFile\fetchForContentObjectAttribute(), eZNodeAssignment\fetchForObject(), eZWorkflowProcess\fetchForSession(), eZWorkflowProcess\fetchForStatus(), eZContentObjectVersion\fetchForUser(), eZWorkflowGroupLink\fetchGroupList(), eZContentClassClassGroup\fetchGroupList(), eZCollaborationItemMessageLink\fetchItemCount(), eZCollaborationItemMessageLink\fetchItemList(), eZCollaborationNotificationRule\fetchItemTypeList(), eZURLObjectLink\fetchLinkList(), eZContentClassName\fetchList(), eZDiscountRule\fetchList(), eZProductCategory\fetchList(), eZDiscountSubRuleValue\fetchList(), eZCollaborationNotificationRule\fetchList(), eZOrderItem\fetchList(), eZVatRule\fetchList(), eZWorkflowGroup\fetchList(), eZISBNGroup\fetchList(), eZDiscountSubRule\fetchList(), eZPolicyLimitationValue\fetchList(), eZSubtreeNotificationRule\fetchList(), eZSection\fetchList(), eZTrigger\fetchList(), eZVatType\fetchList(), eZOperationMemento\fetchList(), eZISBNGroupRange\fetchList(), eZCollaborationItemGroupLink\fetchList(), eZProductCollectionItemOption\fetchList(), eZProductCollectionItem\fetchList(), eZContentClassGroup\fetchList(), eZWorkflowEvent\fetchList(), eZNotificationEvent\fetchList(), eZContentLanguage\fetchList(), eZOrder\fetchList(), eZOrderStatus\fetchList(), eZURLWildcard\fetchList(), eZRSSImport\fetchList(), eZPDFExport\fetchList(), eZRSSExport\fetchList(), eZContentClassAttribute\fetchList(), eZWorkflow\fetchList(), eZWorkflowProcess\fetchList(), eZRole\fetchList(), eZContentObject\fetchList(), eZContentClass\fetchList(), eZContentObjectAttribute\fetchListByClassID(), eZContentClassAttribute\fetchListByClassID(), eZISBNRegistrantRange\fetchListByGroupID(), eZNodeAssignment\fetchListByID(), eZWorkflowProcess\fetchListByKey(), eZOrderItem\fetchListByType(), eZSubtreeNotificationRule\fetchListCount(), eZURLWildcard\fetchListCount(), eZWorkflow\fetchListCount(), eZContentObject\fetchListCount(), eZNotificationCollection\fetchListForHandler(), eZContentBrowseBookmark\fetchListForUser(), eZContentBrowseRecent\fetchListForUser(), eZOrderStatus\fetchMap(), eZSubtreeNotificationRule\fetchNodesForUserID(), fetchObject(), eZURLObjectLink\fetchObjectVersionCount(), eZURLObjectLink\fetchObjectVersionList(), eZOrderStatus\fetchOrderedList(), eZCollaborationItemParticipantLink\fetchParticipantList(), eZContentObjectAttribute\fetchSameClassAttributeIDList(), eZContentObject\fetchSameClassListCount(), eZViewCounter\fetchTopList(), eZNotificationEvent\fetchUnhandledList(), eZContentObjectVersion\fetchUserDraft(), eZUserDiscountRule\fetchUserID(), eZWorkflowProcess\fetchUserList(), eZGeneralDigestHandler\fetchUsersForDigest(), eZContentObjectVersion\fetchVersion(), eZWorkflowGroupLink\fetchWorkflowList(), eZURL\handleList(), eZWishList\itemCount(), eZNotificationCollection\itemCount(), eZProductCollection\itemList(), eZBasket\items(), eZNotificationCollection\items(), eZWishList\items(), eZNotificationCollection\itemsToSend(), eZPolicy\limitationList(), eZRole\policyList(), eZOrder\productItems(), eZObjectRelationListType\removeRelationObject(), reorderObject(), storeObject(), eZISBN10To13Converter\updateContentFromClassAttribute(), eZPolicyLimitation\valueList(), eZProductCollection\verify(), and eZContentObject\versions().
| eZPersistentObject::fill | ( | $ | row | ) |
Tries to fill in the data in the object by using the object definition which is returned by the function definition() and the database row data $row. Each field will be fetch from the definition and then use that fieldname to fetch from the row and set the data.
Definition at line 79 of file ezpersistentobject.php.
Referenced by eZPersistentObject().
| static eZPersistentObject::getShortAttributeName | ( | $ | db, |
| $ | def, | ||
| $ | attrName | ||
| ) | [static] |
Definition at line 1299 of file ezpersistentobject.php.
Referenced by eZURL\handleList().
| static eZPersistentObject::handleRows | ( | $ | rows, |
| $ | class_name, | ||
| $ | asObject | ||
| ) | [static] |
Creates PHP objects out of the database rows $rows. Each object is created from class $ class_name and is passed as a row array as parameter.
| $asObject | If true then objects will be created, if not it just returns $rows as it is. |
Definition at line 897 of file ezpersistentobject.php.
Referenced by eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), eZContentClass\fetchAllClasses(), eZURLAliasML\fetchByAction(), eZURLAliasML\fetchByParentID(), eZURLAliasML\fetchByPath(), eZContentClassClassGroup\fetchClassList(), eZOrderStatusHistory\fetchListByOrder(), eZCollaborationItem\fetchListTool(), fetchObjectList(), eZUser\fetchUserClassList(), eZURLAliasQuery\makeList(), and eZCollaborationGroup\subTree().
| eZPersistentObject::hasAttribute | ( | $ | attr | ) |
Reimplemented in eZWorkflowEvent.
Definition at line 1181 of file ezpersistentobject.php.
Referenced by eZWorkflowProcess\run().
| eZPersistentObject::hasDirtyData | ( | ) |
Definition at line 1282 of file ezpersistentobject.php.
Referenced by sync(), and eZContentClass\sync().
| static eZPersistentObject::newObjectOrder | ( | $ | def, |
| $ | orderField, | ||
| $ | conditions | ||
| ) | [static] |
Returns an order value which can be used for new items in table, for instance placement. Uses $def, $orderField and $conditions to figure out the currently maximum order value and returns one that is larger.
Definition at line 940 of file ezpersistentobject.php.
Referenced by eZEnumValue\create(), eZWorkflowEvent\create(), and eZContentClassAttribute\create().
| eZPersistentObject::remove | ( | $ | conditions = null, |
| $ | extraConditions = null |
||
| ) |
Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames. It uses removeObject to do the real job and passes the object defintion, conditions and extra conditions $extraConditions to this function.
Reimplemented in eZContentClass, eZNodeAssignment, eZPDFExport, and eZDiscountSubRule.
Definition at line 201 of file ezpersistentobject.php.
Referenced by eZWorkflow\removeThis(), eZContentLanguage\removeThis(), eZProductCollectionItem\removeThis(), eZRSSExport\removeThis(), eZSection\removeThis(), eZContentClassAttribute\removeThis(), and eZContentObject\unserialize().
| static eZPersistentObject::removeObject | ( | $ | def, |
| $ | conditions = null, |
||
| $ | extraConditions = null |
||
| ) | [static] |
Deletes the object from the table defined in $def with conditions $conditions and extra conditions $extraConditions. The extra conditions will either be appended to the existing conditions or overwrite existing fields. Uses conditionText() to create the condition SQL.
Definition at line 225 of file ezpersistentobject.php.
Referenced by eZXMLTextType\deleteStoredObjectAttribute(), eZSubTreeHandler\fetchHttpInput(), eZGeneralDigestHandler\handle(), eZContentObject\purge(), eZDiscountSubRule\remove(), remove(), eZURLWildcard\removeAll(), eZEnumObjectValue\removeAllElements(), eZEnumValue\removeAllElements(), eZWaitUntilDateValue\removeAllElements(), eZContentClass\removeAttributes(), eZWorkflowGroupLink\removeByID(), eZDiscountRule\removeByID(), eZISBNGroup\removeByID(), eZURL\removeByID(), eZProductCategory\removeByID(), eZEnumValue\removeByID(), eZISBNGroupRange\removeByID(), eZISBNRegistrantRange\removeByID(), eZWaitUntilDateValue\removeByID(), eZBinaryFile\removeByID(), eZUserDiscountRule\removeByID(), eZMedia\removeByID(), eZContentObjectStateGroup\removeByID(), eZContentObjectState\removeByID(), eZCollaborationNotificationRule\removeByIdentifier(), eZURLWildcard\removeByIDs(), eZSubtreeNotificationRule\removeByNodeAndUserID(), eZEnumObjectValue\removeByOAID(), eZDiscountSubRuleValue\removeBySubRuleID(), eZUserAccountKey\removeByUserID(), eZForgotPassword\removeByUserID(), eZUserSetting\removeByUserID(), eZCollaborationNotificationRule\removeByUserID(), eZWishList\removeByUserID(), eZSubtreeNotificationRule\removeByUserID(), eZPolicyLimitationValue\removeByValue(), eZContentClassClassGroup\removeClassMembers(), eZViewCounter\removeCounter(), eZNotificationCollection\removeEmpty(), eZWorkflow\removeEvents(), eZImageFile\removeForContentObjectAttribute(), eZTipafriendCounter\removeForNode(), eZContentClassClassGroup\removeGroup(), eZWorkflowGroupLink\removeGroupMembers(), eZContentClassClassGroup\removeGroupMembers(), eZWorkflowGroup\removeSelected(), eZContentClassGroup\removeSelected(), eZPolicyLimitation\removeSelected(), eZWorkflow\removeTemporary(), eZContentClass\removeTemporary(), eZWorkflow\removeThis(), eZVatType\removeThis(), eZOrderStatus\removeThis(), eZWorkflowProcess\removeThis(), eZContentObjectAttribute\removeThis(), eZContentObject\removeThis(), eZURLObjectLink\removeURLlinkList(), eZUserDiscountRule\removeUser(), eZUser\removeUser(), eZVatRule\removeVatRule(), eZWorkflow\removeWorkflow(), and eZWorkflowGroupLink\removeWorkflowMembers().
| static eZPersistentObject::reorderObject | ( | $ | def, |
| $ | orderField, | ||
| $ | conditions, | ||
| $ | down = true |
||
| ) | [static] |
Moves a row in a database table. $def is the object definition. Uses $orderField to determine the order of objects in a table, usually this is a placement of some kind. It uses this order field to figure out how move the row, the row is either swapped with another row which is either above or below according to whether $down is true or false, or it is swapped with the first item or the last item depending on whether this row is first or last. Uses $conditions to figure out unique rows.
| orderField | Associative array with one element, the key is the order id and values is order value. |
Definition at line 965 of file ezpersistentobject.php.
Referenced by eZWorkflowEvent\move(), and eZContentClassAttribute\move().
| static eZPersistentObject::replaceFieldsWithShortNames | ( | $ | db, |
| $ | fieldDefs, | ||
| &$ | fields | ||
| ) | [static, private] |
For the given array fields treats its keys (for associative array) or values (for non-associative array) as table fields names and replaces them with short names (aliases) found in fieldDefs.
Definition at line 114 of file ezpersistentobject.php.
Referenced by fetchObjectList(), removeObject(), and storeObject().
| eZPersistentObject::setAttribute | ( | $ | attr, |
| $ | val | ||
| ) |
Sets the attribute $attr to the value $val. The attribute must be present in the objects definition fields or set functions.
Reimplemented in eZURLAliasML, eZPolicy, eZPolicyLimitation, eZDiscountSubRule, eZUserSetting, and eZVatRule.
Definition at line 1243 of file ezpersistentobject.php.
Referenced by eZProductCollection\__clone(), eZProductCollectionItemOption\__clone(), eZProductCollectionItem\__clone(), eZContentObject\__clone(), eZOrder\activate(), eZBasket\createOrder(), eZOrder\detachProductCollection(), eZViewCounter\increase(), eZContentClass\initializeCopy(), eZContentObjectTreeNode\remoteID(), eZContentObject\remoteID(), eZContentClass\remoteID(), eZContentObject\removeThis(), eZContentClass\removeTranslation(), eZContentObject\removeTranslation(), eZRole\revertFromTemporaryVersion(), eZWorkflowProcess\run(), eZContentObject\serialize(), eZContentClass\setAlwaysAvailableLanguageID(), eZContentObject\setAlwaysAvailableLanguageID(), eZRSSImport\setImportDescription(), eZUser\setInformation(), eZContentClass\setName(), eZWorkflowProcess\setParameters(), eZWorkflow\setVersion(), eZContentClass\setVersion(), eZPDFExport\store(), eZRSSExport\store(), eZRSSImport\store(), eZContentClassAttribute\store(), eZContentObjectAttribute\store(), eZContentObjectStateGroup\store(), eZContentObjectState\store(), eZContentClass\store(), eZContentObjectAttribute\storeData(), eZContentClassAttribute\storeDefined(), eZContentClass\storeDefined(), eZContentObjectVersion\unpublish(), eZContentObjectVersion\updateLanguageMask(), eZContentObjectTreeNode\updatePathIdentificationString(), and eZContentObjectAttribute\updateSortKey().
| eZPersistentObject::setHasDirtyData | ( | $ | hasDirtyData | ) |
Sets whether the object has dirty data or not.
Definition at line 1291 of file ezpersistentobject.php.
Referenced by setAttribute().
| eZPersistentObject::store | ( | $ | fieldFilters = null | ) |
Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.
Reimplemented in eZContentObjectTreeNode, eZContentObjectVersion, eZContentObjectState, eZContentObjectStateGroup, eZContentObjectAttribute, eZWorkflowEvent, eZWorkflow, eZContentObject, eZContentClassAttribute, eZURLAliasML, eZUser, eZVatRule, eZRSSImport, eZPDFExport, eZRSSExport, eZURLWildcard, eZPathElement, eZCollaborationItemStatus, and eZUserDiscountRule.
Definition at line 255 of file ezpersistentobject.php.
Referenced by eZOrder\activate(), eZBasket\createOrder(), eZOrder\detachProductCollection(), eZViewCounter\increase(), eZOrder\modifyStatus(), eZRole\revertFromTemporaryVersion(), eZOrderStatus\storeCustom(), and sync().
| static eZPersistentObject::storeObject | ( | $ | obj, |
| $ | fieldFilters = null |
||
| ) | [static, private] |
Stores the data in $obj to database.
| fieldFilters | If specified only certain fields will be stored. |
Definition at line 279 of file ezpersistentobject.php.
Referenced by store(), eZContentObjectStateGroup\store(), and eZContentObjectState\store().
| static eZPersistentObject::swapRow | ( | $ | table, |
| $ | keys, | ||
| $ | order_id, | ||
| $ | rows, | ||
| $ | id1, | ||
| $ | id2 | ||
| ) | [static] |
Sets row id $id2 to have the placement of row id $id1.
Definition at line 920 of file ezpersistentobject.php.
Referenced by reorderObject().
| eZPersistentObject::sync | ( | $ | fieldFilters = null | ) |
Makes sure data is stored if the data is considered dirty.
Reimplemented in eZContentClass.
Definition at line 266 of file ezpersistentobject.php.
Referenced by eZContentObjectTreeNode\remoteID(), eZContentObject\remoteID(), and eZContentObjectTreeNode\updatePathIdentificationString().
| static eZPersistentObject::updateObjectList | ( | $ | parameters | ) | [static] |
Definition at line 1088 of file ezpersistentobject.php.
Referenced by eZWorkflow\setIsEnabled(), eZURL\setIsValid(), eZURL\setLastChecked(), eZContentClassClassGroup\update(), and eZCollaborationItemStatus\updateFields().
| eZPersistentObject::$PersistentDataDirty |
Whether the data is dirty, ie needs to be stored, or not.
Definition at line 1311 of file ezpersistentobject.php.