PHP Class eZContentOperationCollection

Mostrar archivo Open project: ezsystems/ezpublish-legacy Class Usage Examples

Public Methods

Method Description
addAssignment ( integer $nodeID, $objectID, array $selectedNodeIDArray ) : array Adds a new nodeAssignment
attributePublishAction ( $objectID, $versionNum )
beginTransaction ( ) Starts a database transaction.
changeHideStatus ( integer $nodeID ) : array Changes an contentobject's status
changeSortOrder ( integer $nodeID, string $sortingField, boolean $sortingOrder = false ) : array Changes the sort order for a node
changeTranslationAvailableStatus ( integer $objectID, integer $status = false ) : array Changes the status of a translation
clearObjectViewCache ( $objectID, $versionNum = true, $additionalNodeList = false ) *! \static Clears the related viewcaches for the content object using the smart viewcache system.
commitTransaction ( ) Commit a previously started database transaction.
copyTranslations ( $objectID, $versionNum ) *! Copies missing translations from published version to the draft.
createFeedForNode ( integer $nodeID ) Creates a RSS/ATOM Feed export for a node
createNotificationEvent ( $objectID, $versionNum ) *! \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.
deleteObject ( array $deleteIDArray, boolean $moveToTrash = false ) : array Deletes a content object, or a list of content objects
eZContentOperationCollection ( ) *! Constructor
executePrePublishTrigger ( integer $objectID, integer $version ) Executes the pre-publish trigger for this object, and handles specific return statuses from the workflow
generateObjectViewCache ( $objectID ) *! \static Generates the related viewcaches (PreGeneration) for the content object.
loopNodeAssignment ( $objectID, $versionNum )
loopNodes ( $nodeID )
moveNode ( integer $nodeID, integer $objectID, integer $newParentNodeID ) : array Moves a node
publishNode ( $parentNodeID, $objectID, $versionNum, $mainNodeID )
publishObjectExtensionHandler ( $contentObjectID, $contentObjectVersion )
readNode ( $nodeID )
readObject ( $nodeID, $userID, $languageCode )
registerSearchObject ( integer $objectID, integer $version = null, boolean $isMoved = false ) Registers the object in search engine.
removeFeedForNode ( integer $nodeID ) Removes a RSS/ATOM Feed export for a node
removeNodes ( array $removeNodeIdList ) : array Removes nodes
removeOldNodes ( $objectID, $versionNum )
removeTemporaryDrafts ( $objectID, $versionNum )
removeTranslation ( integer $objectID, $languageIDArray ) : array Removes a translation for a contentobject
resetNodeassignmentOpcodes ( $objectID, $versionNum ) New function which resets the op_code field when the object is published.
sendToPublishingQueue ( integer $objectId, integer $version ) : array( Sends the published object/version for publishing to the queue Used by the content/publish operation
setObjectStatusPublished ( $objectID, $versionNum )
setVersionStatus ( $objectID, $versionNum, $status )
swapNode ( integer $nodeID, integer $selectedNodeID, array $nodeIdList = [] ) : array Swap a node with another one
updateAlwaysAvailable ( integer $objectID, integer $newAlwaysAvailable ) : array Set the always available flag for a content object
updateInitialLanguage ( integer $objectID, integer $newInitialLanguageID ) : array Updates an contentobject's initial language
updateMainAssignment ( integer $mainAssignmentID, $ObjectID, integer $mainAssignmentParentID ) : array Update a node's main assignment
updateNontranslatableAttributes ( $objectID, $versionNum ) *! Updates non-translatable attributes.
updateObjectState ( integer $objectID, integer $selectedStateIDList ) : array Update a contentobject's state
updatePriority ( integer $parentNodeID, array $priorityArray = [], array $priorityIDArray = [] ) : array Updates the priority of a node
updateSection ( integer $nodeID, integer $selectedSectionID ) : array Assigns a node to a section
updateSectionID ( $objectID, $versionNum )

Method Details

addAssignment() public static method

Adds a new nodeAssignment
public static addAssignment ( integer $nodeID, $objectID, array $selectedNodeIDArray ) : array
$nodeID integer
$selectedNodeIDArray array
return array An array with operation status, always true

attributePublishAction() public static method

public static attributePublishAction ( $objectID, $versionNum )

beginTransaction() public static method

Starts a database transaction.
public static beginTransaction ( )

changeHideStatus() public static method

Changes an contentobject's status
public static changeHideStatus ( integer $nodeID ) : array
$nodeID integer
return array An array with operation status, always true

changeSortOrder() public static method

Changes the sort order for a node
public static changeSortOrder ( integer $nodeID, string $sortingField, boolean $sortingOrder = false ) : array
$nodeID integer
$sortingField string
$sortingOrder boolean
return array An array with operation status, always true

changeTranslationAvailableStatus() public static method

Changes the status of a translation
public static changeTranslationAvailableStatus ( integer $objectID, integer $status = false ) : array
$objectID integer
$status integer
return array An array with operation status, always true

clearObjectViewCache() public static method

\param $objectID The ID of the content object to clear caches for \param $versionNum The version of the object to use or \c true for current version \param $additionalNodeList An array with node IDs to add to clear list, or \c false for no additional nodes.
public static clearObjectViewCache ( $objectID, $versionNum = true, $additionalNodeList = false )

commitTransaction() public static method

Commit a previously started database transaction.
public static commitTransaction ( )

copyTranslations() public static method

*! Copies missing translations from published version to the draft.
public static copyTranslations ( $objectID, $versionNum )

createFeedForNode() public static method

Creates a RSS/ATOM Feed export for a node
Since: 4.3
public static createFeedForNode ( integer $nodeID )
$nodeID integer Node ID

createNotificationEvent() public static method

*! \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.
public static createNotificationEvent ( $objectID, $versionNum )

deleteObject() public static method

Deletes a content object, or a list of content objects
public static deleteObject ( array $deleteIDArray, boolean $moveToTrash = false ) : array
$deleteIDArray array
$moveToTrash boolean
return array An array with operation status, always true

eZContentOperationCollection() public method

*! Constructor

executePrePublishTrigger() public static method

Executes the pre-publish trigger for this object, and handles specific return statuses from the workflow
Since: 4.2
public static executePrePublishTrigger ( integer $objectID, integer $version )
$objectID integer Object ID
$version integer Version number

generateObjectViewCache() public static method

It will only do this if [ContentSettings]/PreViewCache in site.ini is enabled. \param $objectID The ID of the content object to generate caches for.
public static generateObjectViewCache ( $objectID )

loopNodeAssignment() public static method

public static loopNodeAssignment ( $objectID, $versionNum )

loopNodes() public static method

public static loopNodes ( $nodeID )

moveNode() public static method

Moves a node
public static moveNode ( integer $nodeID, integer $objectID, integer $newParentNodeID ) : array
$nodeID integer
$objectID integer
$newParentNodeID integer
return array An array with operation status, always true

publishNode() public static method

public static publishNode ( $parentNodeID, $objectID, $versionNum, $mainNodeID )

publishObjectExtensionHandler() public method

public publishObjectExtensionHandler ( $contentObjectID, $contentObjectVersion )

readNode() public static method

public static readNode ( $nodeID )

readObject() public static method

public static readObject ( $nodeID, $userID, $languageCode )

registerSearchObject() public static method

Registers the object in search engine.
public static registerSearchObject ( integer $objectID, integer $version = null, boolean $isMoved = false )
$objectID integer Id of the object.
$version integer Operation collection passes this default param. Not used in the method
$isMoved boolean true if node is being moved

removeFeedForNode() public static method

Removes a RSS/ATOM Feed export for a node
Since: 4.3
public static removeFeedForNode ( integer $nodeID )
$nodeID integer Node ID

removeNodes() public static method

This function does not check about permissions, this is the responsibility of the caller!
public static removeNodes ( array $removeNodeIdList ) : array
$removeNodeIdList array Array of Node ID to remove
return array An array with operation status, always true

removeOldNodes() public static method

public static removeOldNodes ( $objectID, $versionNum )

removeTemporaryDrafts() public static method

public static removeTemporaryDrafts ( $objectID, $versionNum )

removeTranslation() public static method

Removes a translation for a contentobject
public static removeTranslation ( integer $objectID, $languageIDArray ) : array
$objectID integer
return array An array with operation status, always true

resetNodeassignmentOpcodes() public static method

New function which resets the op_code field when the object is published.
public static resetNodeassignmentOpcodes ( $objectID, $versionNum )

sendToPublishingQueue() public static method

Sends the published object/version for publishing to the queue Used by the content/publish operation
Since: 4.5
public static sendToPublishingQueue ( integer $objectId, integer $version ) : array(
$objectId integer
$version integer
return array(

setObjectStatusPublished() public static method

public static setObjectStatusPublished ( $objectID, $versionNum )

setVersionStatus() public static method

public static setVersionStatus ( $objectID, $versionNum, $status )

swapNode() public static method

Swap a node with another one
public static swapNode ( integer $nodeID, integer $selectedNodeID, array $nodeIdList = [] ) : array
$nodeID integer
$selectedNodeID integer
$nodeIdList array
return array An array with operation status, always true

updateAlwaysAvailable() public static method

Set the always available flag for a content object
public static updateAlwaysAvailable ( integer $objectID, integer $newAlwaysAvailable ) : array
$objectID integer
$newAlwaysAvailable integer
return array An array with operation status, always true

updateInitialLanguage() public static method

Updates an contentobject's initial language
public static updateInitialLanguage ( integer $objectID, integer $newInitialLanguageID ) : array
$objectID integer
$newInitialLanguageID integer
return array An array with operation status, always true

updateMainAssignment() public static method

Update a node's main assignment
public static updateMainAssignment ( integer $mainAssignmentID, $ObjectID, integer $mainAssignmentParentID ) : array
$mainAssignmentID integer
$mainAssignmentParentID integer
return array An array with operation status, always true

updateNontranslatableAttributes() public static method

*! Updates non-translatable attributes.
public static updateNontranslatableAttributes ( $objectID, $versionNum )

updateObjectState() public static method

Update a contentobject's state
public static updateObjectState ( integer $objectID, integer $selectedStateIDList ) : array
$objectID integer
$selectedStateIDList integer
return array An array with operation status, always true

updatePriority() public static method

Updates the priority of a node
public static updatePriority ( integer $parentNodeID, array $priorityArray = [], array $priorityIDArray = [] ) : array
$parentNodeID integer
$priorityArray array
$priorityIDArray array
return array An array with operation status, always true

updateSection() public static method

Assigns a node to a section
public static updateSection ( integer $nodeID, integer $selectedSectionID ) : array
$nodeID integer
$selectedSectionID integer
return array An array with operation status, always true

updateSectionID() public static method

public static updateSectionID ( $objectID, $versionNum )