eZPublish(LegacyStack)  5.1
ezsubtreecopy.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Functions

 copyPublishContentObject ($sourceObject, $sourceSubtreeNodeIDList, &$syncNodeIDListSrc, &$syncNodeIDListNew, &$syncObjectIDListSrc, &$syncObjectIDListNew, $allVersions=false, $keepCreator=false, $keepTime=false)
 

Variables

 $allVersions = $scriptOptions[ 'all-versions' ]
 
 $cli = eZCLI::instance()
 
foreach($relatedRecordsList as
$relatedEntry) 
$conditions
 
 $countNodeList = count( $sourceNodeList )
 
 $db = eZDB::instance()
 
 $destinationNode = ( $dstNodeID ) ? eZContentObjectTreeNode::fetch( $dstNodeID ) : false
 
 $dstNodeID = $scriptOptions[ 'dst-node-id' ] ? $scriptOptions[ 'dst-node-id' ] : false
 
if(!$db) $idListStr = implode( ',', $syncObjectIDListNew )
 
 $k = 0
 
 $keepCreator = $scriptOptions[ 'keep-creator' ]
 
 $keepTime = $scriptOptions[ 'keep-time' ]
 
 $key = array_search( $sourceSubTreeMainNodeID, $syncNodeIDListSrc )
 
 $newNodeList [] = $newSubTreeMainNode
 
 $newSubTreeMainNode = eZContentObjectTreeNode::fetch( $newSubTreeMainNodeID )
 
if($key===false$newSubTreeMainNodeID = $syncNodeIDListSrc[ $key ]
 
 $relatedRecordsList = $db->arrayQuery( "SELECT * FROM ezcontentobject_link WHERE from_contentobject_id IN ($idListStr)" )
 
 $script
 
 $scriptOptions
 
 $sourceNodeIDList = array()
 
if(!$sourceSubTreeMainNode) if(!$destinationNode) $sourceNodeList = array()
 
 $sourceNodeList [] = $sourceSubTreeMainNode
 
 $sourceSubTreeMainNode = ( $srcNodeID ) ? eZContentObjectTreeNode::fetch( $srcNodeID ) : false
 
 $sourceSubTreeMainNodeID = $sourceSubTreeMainNode->attribute( 'node_id' )
 
 $srcNodeID = $scriptOptions[ 'src-node-id' ] ? $scriptOptions[ 'src-node-id' ] : false
 
 $syncNodeIDListNew = array()
 
 $syncNodeIDListNew [] = (int) $dstNodeID
 
 $syncNodeIDListSrc = array()
 
 $syncNodeIDListSrc [] = $sourceSubTreeMainNode->attribute( 'parent_node_id' )
 
 $syncObjectIDListNew = array()
 
 $syncObjectIDListSrc = array()
 

Function Documentation

copyPublishContentObject (   $sourceObject,
  $sourceSubtreeNodeIDList,
$syncNodeIDListSrc,
$syncNodeIDListNew,
$syncObjectIDListSrc,
$syncObjectIDListNew,
  $allVersions = false,
  $keepCreator = false,
  $keepTime = false 
)

Referenced by copySubtree().

Variable Documentation

$allVersions = $scriptOptions[ 'all-versions' ]
$cli = eZCLI::instance()
foreach ($syncObjectIDListNew as $contentObjectID) $conditions
Initial value:
= array( 'contentobject_id' => '',
'data_type_string' => 'ezxmltext' )

Referenced by eZPersistentObject\conditionText(), eZPersistentObject\conditionTextByRow(), eZSiteInstaller\contentObjectByName(), copySubtree(), eZPDFExport\countGeneratingOnceExports(), eZISBNGroupRange\extractGroup(), eZISBNRegistrantRange\extractRegistrant(), eZCollaborationProfile\fetch(), eZCollaborationItemStatus\fetch(), eZCollaborationItem\fetch(), eZCollaborationGroup\fetch(), eZContentObjectTreeNode\fetch(), eZContentObjectStateGroup\fetchByConditions(), eZContentObjectState\fetchByConditions(), eZISBNGroup\fetchByGroup(), eZCollaborationProfile\fetchByUser(), eZInformationCollection\fetchByUserIdentifier(), eZInformationCollection\fetchCollectionsCount(), eZInformationCollection\fetchCollectionsList(), eZShopFunctionCollection\fetchCurrencyList(), eZSection\fetchFilteredList(), eZContentObject\fetchFilteredList(), eZCollaborationItemMessageLink\fetchItemCount(), eZURLObjectLink\fetchLinkList(), eZCurrencyData\fetchList(), eZProductCollectionItem\fetchList(), eZContentClassAttribute\fetchList(), eZContentObject\fetchList(), eZContentObjectAttribute\fetchListByClassID(), eZISBNRegistrantRange\fetchListByGroupID(), eZCurrencyData\fetchListCount(), eZContentObject\fetchListCount(), eZContentObjectAttribute\fetchSameClassAttributeIDList(), eZContentObject\fetchSameClassList(), eZURL\handleList(), eZPersistentObject\newObjectOrder(), eZPDFExport\remove(), eZPersistentObject\remove(), eZURLWildcard\removeByIDs(), eZPersistentObject\removeObject(), eZURLObjectLink\removeURLlinkList(), eZPersistentObject\reorderObject(), eZISBN10To13Converter\updateContentFromClassAttribute(), eZPersistentObject\updateObjectList(), and eZContentObject\versions().

$countNodeList = count( $sourceNodeList )

Referenced by copySubtree().

$db = eZDB::instance()
$dstNodeID = $scriptOptions[ 'dst-node-id' ] ? $scriptOptions[ 'dst-node-id' ] : false

Referenced by copySubtree().

if (!$db) $idListStr = implode( ',', $syncObjectIDListNew )
$keepCreator = $scriptOptions[ 'keep-creator' ]
$keepTime = $scriptOptions[ 'keep-time' ]
$key = array_search( $sourceSubTreeMainNodeID, $syncNodeIDListSrc )

Referenced by ezpLanguageSwitcher\__construct(), ezpCacheStorageClusterOptions\__get(), ezpCacheStorageClusterOptions\__isset(), ezpCacheStorageClusterOptions\__set(), eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), eZMultiOption2\addOption(), eZMultiOption\addOption(), eZMultiOption2\addOptionToRules(), eZShopOperationCollection\addToBasket(), eZPolicyLimitation\allValuesAsArrayWithNames(), eZImageManager\appendImageAlias(), eZContentCacheManager\appendKeywordNodeIDs(), eZPackage\appendSimpleFile(), eZCodeTemplate\apply(), Cpdf\ARC4_init(), eZTextTool\arrayFlatten(), eZRSSImport\arrayMergeRecursive(), eZMySQLiDB\arrayQuery(), eZMultiplexerType\attribute(), eZApproveType\attribute(), eZWebDAVContentBackendAuth\authorize(), eZContentBrowse\browse(), eZDiffTextEngine\buildDiff(), eZSearch\buildSearchArray(), eZContentClassAttribute\cachedInfo(), eZTemplateFileResource\cachedTemplateTree(), eZTemplateTreeCache\cachedTree(), eZCharTransform\cacheFilePath(), eZTemplateFileResource\cacheKey(), eZMultiPrice\calcPriceList(), eZPDFTable\callCircle(), eZPDFTable\callFilledRectangle(), eZPDFTable\callFont(), eZPDFTable\callRectangle(), eZPDFTable\callTable(), eZPDFTable\callText(), calltostring(), eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentClass\canInstantiateClassList(), eZTranslationCache\canRestoreCache(), eZTemplateTreeCache\canRestoreCache(), eZPackage\canUsePackagePolicyFunction(), eZMultiOption\changeMultiOptionId(), eZMultiOption2\changeMultiOptionId(), eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZAutoloadGenerator\checkMaxClassLength(), eZMD5\checkMD5Sums(), checkNodeAssignments(), checkNodeMovements(), eZSubtreeNotificationRule\checkObjectAccess(), eZMultiOption2\cleanupRules(), eZCache\clearItem(), eZMatrix\columnIndex(), eZTemplateCompiler\compilationFilename(), eZTemplateFileResource\compileTemplate(), eZTemplateCompiler\compileTemplate(), eZTemplate\compileTemplateFile(), eZMail\composeEmailItems(), eZMail\composeEmailName(), convertSerializedData(), copyPublishContentObject(), copySubtree(), eZContentObject\copyVersion(), eZDebug\createAccumulator(), eZDebug\createAccumulatorGroup(), eZContentObjectTreeNode\createAttributeFilterSQLStrings(), eZPaymentCallbackChecker\createDataFromPOST(), eZTemplateSetFunction\createDefaultVariables(), eZImageManager\createImageAliasKey(), eZImageAliasHandler\createImageInformationNode(), eZOperationMemento\createKey(), eZWorkflowProcess\createKey(), eZDir\createMultiLevelPath(), eZHTTPTool\createPostVarsFromImageButtons(), eZPackageCreationHandler\creatorList(), eZObjectRelationListType\customObjectAttributeHTTPAction(), eZTemplateSetFunction\defineVariables(), eZContentUpload\detectLocations(), ezpKernelWeb\dispatchLoop(), eZStepSiteTemplates\display(), eZTemplate\display(), eZTemplateAttributeOperator\displayVariable(), eZPackage\domStructure(), eZSOAPCodec\encodeValue(), Cpdf\encryptInit(), eZPersistentObject\escapeArray(), eZWaitUntilDateType\execute(), eZTemplateCompiler\executeCompilation(), eZTemplateFileResource\executeCompiledTemplate(), eZCodeTemplate\eZCodeTemplate(), eZPDFTable\ezInsertBlockFrame(), eZPDFTable\ezInsertFrame(), eZSetupPrvtExtractExtraPaths(), eZSetupTestPhpVersion(), eZPDFTable\ezTable(), eZTemplatePHPOperator\eZTemplatePHPOperator(), Cezpdf\ezText(), eZMultiPriceData\fetch(), eZContentObjectTreeNode\fetch(), eZShopFunctionCollection\fetchBestSellList(), eZSelectionType\fetchClassAttributeHTTPInput(), eZDateTimeType\fetchClassAttributeHTTPInput(), eZContentClassClassGroup\fetchClassList(), eZContentObject\fetchDataMap(), eZAutoloadGenerator\fetchFiles(), eZApproveType\fetchHTTPInput(), eZMultiOption2Type\fetchHTTPInputForGroup(), eZWorkflow\fetchLimited(), eZCurrencyData\fetchList(), eZCollaborationItem\fetchListTool(), eZPackage\fetchMaintainerRoleIDList(), eZContentFunctionCollection\fetchMostViewedTopList(), eZPackageType\fetchObjectAttributeHTTPInput(), eZShopFunctionCollection\fetchRelatedPurchaseList(), eZContentFunctionCollection\fetchTipafriendTopList(), eZSubtreeNotificationRule\fetchUserList(), eZDFSFileHandler\fileDeleteByDirList(), eZPersistentObject\fill(), eZTemplateCacheBlock\filterKeys(), eZMultiOption2\findGroup(), eZTranslatorGroup\findKey(), eZTranslatorManager\findKey(), eZTSTranslator\findKey(), eZ1337Translator\findMessage(), eZBorkTranslator\findMessage(), eZTSTranslator\findMessage(), eZMultiOption2\findMultiOption(), eZMultiOption2\findOption(), eZObjectRelationListType\fixRelationsRestore(), eZObjectRelationListType\fixRelationsSwap(), eZObjectRelationListType\fixRelationsTrash(), eZMatrixType\fromString(), eZTemplateCompiler\generatePHPCodeChildren(), eZTemplateCompiler\generateVariableDataCode(), eZNodeviewfunctions\generateViewCacheFile(), eZSession\get(), eZAutoloadGenerator\getClassFileList(), eZWebDAVContentBackend\getContentNodeData(), eZPaymentGatewayType\getGateways(), eZLDAPUser\goAndPublishGroups(), eZGeneralDigestHandler\handle(), eZTemplateFileResource\hasCachedProcessTree(), eZTemplateFileResource\hasCompiledTemplate(), eZTemplateCompiler\hasCompiledTemplate(), eZContentObjectVersion\hasConflicts(), eZWizardBase\hasMetaData(), eZTemplateBlockFunction\hasPlacementKey(), eZWizardBase\hasVariable(), eZPDFTable\headerIndex(), eZPDFTable\headerLabel(), eZStringUtils\implodeStr(), eZSearchEngine\indexWords(), eZStepSitePackages\init(), eZModule\initialize(), eZKeyword\initializeKeyword(), eZIniSettingType\initializeObjectAttribute(), eZObjectRelationListType\initializeObjectAttribute(), eZStepCreateSites\initializePackage(), eZLocale\initLanguage(), eZTSTranslator\insert(), eZINI\instance(), eZTemplateTreeCache\internalKey(), eZWorkflow\isAllowed(), eZSession\issetkey(), eZContentLanguage\jsArrayByMask(), eZTranslatorGroup\keyTranslate(), eZTranslatorManager\keyTranslate(), eZTSTranslator\keyTranslate(), eZContentLanguage\languagesByMask(), eZCodePage\load(), eZContentObjectPackageCreator\loadObjectList(), eZDBSchemaInterface\loadSchemaTransformationRules(), eZTSTranslator\loadTranslationFile(), eZLDAPUser\loginUser(), eZModuleOperationInfo\makeKeyArray(), ezpMvcRegexpRoute\matches(), eZTemplateDesignResource\mergeKeys(), eZMutex\meta(), eZWizardBase\metaData(), eZWordToImageOperator\modify(), eZPackageOperator\modify(), eZPDF\modify(), eZStepData\nextStep(), eZMath\normalizeColorArray(), Cpdf\o_pattern(), eZIniSettingType\objectAttributeContent(), eZObjectRelationListType\onPublish(), Cpdf\openFont(), eZTemplateOptimizer\optimize(), eZTemplateOptimizer\optimizeFunction(), eZPDFTable\outputDocSpecification(), eZXMLOutputHandler\outputTag(), eZContentObjectVersion\parentNodes(), eZIniSettingType\parseArrayInput(), parseArrayToStr(), parseCustomSerializedDataOption(), eZPackage\parseDOMTree(), eZUserOperationCollection\preferences(), eZSearchEngine\prepareWordIDArrays(), eZDiffTextEngine\preProcess(), eZStepData\previousStep(), eZSerializedObjectNameList\prioritizedLanguagesJsArray(), eZEXIFImageAnalyzer\process(), eZTemplateRoot\process(), eZTemplateDefFunction\process(), eZTemplateIncludeFunction\process(), eZTemplateIfFunction\process(), eZTemplateBlockFunction\process(), eZTemplateToolbarFunction\process(), eZTemplateForeachFunction\process(), eZTemplateSetFunction\process(), eZTemplateSectionFunction\process(), eZTemplateSectionFunction\processChildren(), ezpRestOauthAuthenticationStyle\processLoginRequired(), eZStepSiteTemplates\processPostData(), eZStepData\progress(), eZContentUpload\publishObject(), eZMySQLiDB\query(), eZRSSImport\recursiveFieldMap(), eZTemplateBlockFunction\registerPlacementKey(), eZURL\registerURLArray(), eZKeyword\relatedObjects(), eZPersistentObject\remove(), eZTSTranslator\remove(), eZMultiOption2\removeChildGroup(), eZWorkflowFunctions\removeGroup(), eZClassFunctions\removeGroup(), eZTSTranslator\removeKey(), eZTemplateDesignResource\removeKey(), eZPersistentObject\removeObject(), eZMultiOption\removeOptions(), eZMultiOption2\removeOptions(), eZRole\removePolicy(), eZContentObject\removeThis(), eZXHTMLXMLOutput\renderInline(), eZXHTMLXMLOutput\renderLine(), eZXHTMLXMLOutput\renderParagraph(), eZPersistentObject\replaceFieldsWithShortNames(), ezpKernelWeb\requestInit(), eZTranslationCache\restoreCache(), eZTemplateTreeCache\restoreCache(), ezpKernelWeb\run(), eZProcess\runFile(), eZMultiOption2\runFunctionForAllGroups(), eZTrigger\runWorkflow(), eZSession\set(), eZXMLInputParser\setAttributes(), eZTemplateFileResource\setCachedTemplateTree(), eZTemplateTreeCache\setCachedTree(), eZModule\setCurrentName(), eZTemplateSectionIterator\setIteratorValues(), eZMutex\setMeta(), eZWizardBase\setMetaData(), eZNodeAssignment\setNewMainAssignment(), ezpRestAuthorizedClient\setState(), ezpRestClient\setState(), eZURI\setURIString(), eZWizardBase\setVariable(), eZTranslationCache\storeCache(), eZTemplateTreeCache\storeCache(), eZCodePage\storeCacheObject(), eZContentObject\storeNodeModified(), eZPersistentObject\storeObject(), eZStepInstaller\storePersistenceData(), storeRSSImport(), strReplaceByArray(), eZContentStructureTreeOperator\subTree(), eZPersistentObject\swapRow(), eZTemplateToolbarFunction\templateNodeTransformation(), eZTemplateForeachFunction\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZPHPCreator\thisVariableText(), eZOptionType\toString(), eZMultiOptionType\toString(), eZCharTransform\transform(), eZCharTransform\transformByGroup(), eZDBSchemaInterface\transformData(), eZDBSchemaInterface\transformSchema(), eZContentObjectTrashNode\trashList(), eZDiffTextEngine\trimEmptyArrayElements(), eZDir\unlinkWildcard(), eZSession\unsetkey(), eZContentUpload\upload(), eZRSSExport\urlEncodePath(), eZUser\validateLoginName(), eZWizardBase\variable(), eZINI\variableArray(), eZINI\variableMulti(), eZPHPCreator\variableText(), and eZXMLInputParser\wordMatchSupport().

$newNodeList = $newSubTreeMainNode
$newSubTreeMainNode = eZContentObjectTreeNode::fetch( $newSubTreeMainNodeID )

Referenced by copySubtree().

if ($key===false) $newSubTreeMainNodeID = $syncNodeIDListSrc[ $key ]

Referenced by copySubtree().

$relatedRecordsList = $db->arrayQuery( "SELECT * FROM ezcontentobject_link WHERE from_contentobject_id IN ($idListStr)" )

Referenced by copySubtree().

$script
Initial value:
= eZScript::instance( array( 'description' => ( "\n" .
"This script will make a copy of a content object subtree and place it in a specified\n" .
"location.\n" ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true,
'user' => true ) )
static instance($settings=array())
Returns a shared instance of the eZScript class.
Definition: ezscript.php:1084
$scriptOptions
Initial value:
= $script->getOptions( "[src-node-id:][dst-node-id:][all-versions][keep-creator][keep-time]",
"",
array( 'src-node-id' => "Source subtree parent node ID.",
'dst-node-id' => "Destination node ID.",
'all-versions' => "Copy all versions for each contentobject being copied.",
'keep-creator'=> "Do not change the creator (user) for the copied content objects.",
'keep-time' => "Do not change the creation and modification time of the copied content objects."
),
false,
array( 'user' => true )
)
$script
Definition: adddefaultstates.php:22
$sourceNodeIDList = array()

Referenced by copySubtree().

$sourceNodeList = array()

Referenced by copySubtree().

$sourceNodeList[] = $sourceSubTreeMainNode
$sourceSubTreeMainNode = ( $srcNodeID ) ? eZContentObjectTreeNode::fetch( $srcNodeID ) : false

Referenced by copySubtree().

$sourceSubTreeMainNodeID = $sourceSubTreeMainNode->attribute( 'node_id' )

Referenced by copySubtree().

$srcNodeID = $scriptOptions[ 'src-node-id' ] ? $scriptOptions[ 'src-node-id' ] : false
$syncNodeIDListNew = array()
$syncNodeIDListNew[] = (int) $dstNodeID
$syncNodeIDListSrc = array()
$syncNodeIDListSrc[] = $sourceSubTreeMainNode->attribute( 'parent_node_id' )
$syncObjectIDListNew = array()
$syncObjectIDListSrc = array()