eZPublish  3.9
eZContentObjectPackageHandler Class Reference

Handles content objects in the package system. More...

+ Inheritance diagram for eZContentObjectPackageHandler:
+ Collaboration diagram for eZContentObjectPackageHandler:

Public Member Functions

 add ($packageType, &$package, &$cli, $parameters)
 
 addNode ($nodeID, $isSubtree=true)
 
 contentObjectDirectory ()
 
 explainInstallItem (&$package, $installItem)
 
 eZContentObjectPackageHandler ()
 
 fetchObjectFromFile ($objectFileNode)
 
 generatePackage (&$package, $options)
 
 getRealObjectNode ($objectNode)
 
 handleAddParameters ($packageType, &$package, &$cli, $arguments)
 
 install (&$package, $installType, $parameters, $name, $os, $filename, $subdirectory, &$content, &$installParameters, &$installData)
 
 uninstall (&$package, $installType, $parameters, $name, $os, $filename, $subdirectory, &$content, &$installParameters, &$installData)
 
- Public Member Functions inherited from eZPackageHandler
 add ($packageType, &$package, $parameters)
 
 createDependencyNode (&$package, &$dependencyNode, $dependencyItem, $dependencySection)
 
 createDependencyText (&$package, $dependencyItem, $dependencySection)
 
 createInstallNode (&$package, &$installNode, $installItem, $installType)
 
 errorChoosenAction ($errorCode, &$installParameters, $description=false, $handlerType=false, $resetError=true)
 
 extractInstallContent ()
 
 eZPackageHandler ($handlerType, $parameters=array())
 
 handlerType ()
 
 isErrorElement ($elementID, &$installParameters)
 
 parseDependencyNode (&$package, &$dependencyNode, &$dependencyParameters, $dependencySection)
 
 parseInstallNode (&$package, &$installNode, &$installParameters, $isInstall)
 
 reset ()
 
 uninstall (&$package, $installType, $parameters, $name, $os, $filename, $subdirectory, $installParameters, &$installData)
 

Public Attributes

 $NodeIDArray = array()
 
 $NodeObjectArray = array()
 
 $ObjectArray = array()
 
 $OverrideClassRemoteID = 'content_class_remote_id'
 
 $OverrideNodeRemoteID = 'content_node_remote_id'
 
 $OverrideObjectRemoteID = 'content_object_remote_id'
 
 $OverrideParentNodeRemoteID = 'parent_content_node_remote_id'
 
 $OverrideSettingsArray = array()
 
 $Package = null
 
 $RootNodeIDArray = array()
 
 $RootNodeObjectArray = array()
 
 $TemplateFileArray = array()
 

Private Member Functions

 createDOMNodeFromFile ($filename, $siteAccess, $filetype=false)
 
 createObjectListNode ($options)
 
 createSiteAccessListNode ($options)
 
 createTopNodeListDOMNode ($options)
 
generateClassIDArray ()
 
generateFetchAliasArray ()
 
 generateObjectArray ($nodeAssignment)
 
generateOverrideSettingsArray ($siteAccessArray, $minimalTemplateSet)
 
generateTemplateFilenameArray ()
 
 handleParameters ($packageType, &$package, &$cli, $type, $arguments)
 
 installContentObjects ($objectNodes, $topNodeListNode, &$installParameters)
 
 installFetchAliases ($fetchAliasListNode, &$parameters)
 
 installOverrides ($overrideListNode, &$parameters)
 
 installSuspendedNodeAssignment (&$installParameters)
 
 installSuspendedObjectRelations (&$installParameters)
 
 installTemplates ($templateList, &$package, $subdirectory, &$installParameters)
 

Detailed Description

Handles content objects in the package system.

Member Function Documentation

eZContentObjectPackageHandler::add (   $packageType,
$package,
$cli,
  $parameters 
)
eZContentObjectPackageHandler::addNode (   $nodeID,
  $isSubtree = true 
)

Add Node list to ezcontentobject package handler.

Parameters
nodeid
subtree(optional, default true )

Referenced by add().

eZContentObjectPackageHandler::contentObjectDirectory ( )
eZContentObjectPackageHandler::createDOMNodeFromFile (   $filename,
  $siteAccess,
  $filetype = false 
)
private

Add file to repository and return DONNode description of file

Parameters
filename
siteaccess
filetype(optional)

Referenced by generateTemplateFilenameArray().

eZContentObjectPackageHandler::createObjectListNode (   $options)
private

Serializes and adds all contentobjects to package

Parameters
options

Referenced by generatePackage().

eZContentObjectPackageHandler::createSiteAccessListNode (   $options)
private

Create DOMNode for list of added siteaccesses.

Parameters
options

Referenced by generatePackage().

eZContentObjectPackageHandler::createTopNodeListDOMNode (   $options)
private

Create DOMNode for list of top nodes.

Parameters
options

Referenced by generatePackage().

eZContentObjectPackageHandler::explainInstallItem ( $package,
  $installItem 
)
virtual

Returns an explanation for the content object install item.

The explanaition is actually a list having the following structure: array( array( 'description' => 'Content object Foo' ), array( 'description' => 'Content object Bar' ), array( 'description' => 'Content object Baz' ) );

When number of items in the above list is too high, the following array is returned instead: array( 'description' => 'NNN content objects' );

Implements eZPackageHandler.

eZContentObjectPackageHandler::eZContentObjectPackageHandler ( )

Constructor

eZContentObjectPackageHandler::fetchObjectFromFile (   $objectFileNode)

Fetches object stored in separate xml file

Referenced by explainInstallItem(), and getRealObjectNode().

& eZContentObjectPackageHandler::generateClassIDArray ( )
private

Get list of all class objects used in by the nodes in NodeArray

Referenced by generatePackage().

& eZContentObjectPackageHandler::generateFetchAliasArray ( )
private

Referenced by generatePackage().

eZContentObjectPackageHandler::generateObjectArray (   $nodeAssignment)
private

Generate list of content objects to export, and store them to

Parameters
node_assignments,'selected'or 'main'

Referenced by generatePackage().

& eZContentObjectPackageHandler::generateOverrideSettingsArray (   $siteAccessArray,
  $minimalTemplateSet 
)
private

Get all template overrides used by exported objects

Parameters
siteaccess array

Referenced by generatePackage().

eZContentObjectPackageHandler::generatePackage ( $package,
  $options 
)

Generate package based on NodeArray and input options

Parameters
package
options

Referenced by add().

& eZContentObjectPackageHandler::generateTemplateFilenameArray ( )
private

Referenced by generatePackage().

eZContentObjectPackageHandler::getRealObjectNode (   $objectNode)

Referenced by installContentObjects(), and uninstall().

eZContentObjectPackageHandler::handleAddParameters (   $packageType,
$package,
$cli,
  $arguments 
)
virtual

Implements eZPackageHandler.

eZContentObjectPackageHandler::handleParameters (   $packageType,
$package,
$cli,
  $type,
  $arguments 
)
private

Referenced by handleAddParameters().

eZContentObjectPackageHandler::install ( $package,
  $installType,
  $parameters,
  $name,
  $os,
  $filename,
  $subdirectory,
$content,
$installParameters,
$installData 
)
virtual

Creates a new contentobject as defined in the xml structure.

Implements eZPackageHandler.

eZContentObjectPackageHandler::installContentObjects (   $objectNodes,
  $topNodeListNode,
$installParameters 
)
private

Serialize and install content objects

Parameters
object-listDOMNode
installparameters

Referenced by install().

eZContentObjectPackageHandler::installFetchAliases (   $fetchAliasListNode,
$parameters 
)
private

Install fetch alias overrides

Parameters
fetchalias list
installparameters

Referenced by install().

eZContentObjectPackageHandler::installOverrides (   $overrideListNode,
$parameters 
)
private

Install overrides

Parameters
overridelist
installparameters

Referenced by install().

eZContentObjectPackageHandler::installSuspendedNodeAssignment ( $installParameters)
private
Parameters
installparameters

Referenced by installContentObjects().

eZContentObjectPackageHandler::installSuspendedObjectRelations ( $installParameters)
private

Installs suspended content object relations (need for complex content-relations structure)

Parameters
installparameters

Referenced by installContentObjects().

eZContentObjectPackageHandler::installTemplates (   $templateList,
$package,
  $subdirectory,
$installParameters 
)
private

Set and install templates

Parameters
templatelist
package
subdirectory
installparameters.

Referenced by install().

eZContentObjectPackageHandler::uninstall ( $package,
  $installType,
  $parameters,
  $name,
  $os,
  $filename,
  $subdirectory,
$content,
$installParameters,
$installData 
)

Uninstalls all previously installed content objects.

Member Data Documentation

eZContentObjectPackageHandler::$NodeIDArray = array()
eZContentObjectPackageHandler::$NodeObjectArray = array()
eZContentObjectPackageHandler::$ObjectArray = array()
eZContentObjectPackageHandler::$OverrideClassRemoteID = 'content_class_remote_id'
eZContentObjectPackageHandler::$OverrideNodeRemoteID = 'content_node_remote_id'
eZContentObjectPackageHandler::$OverrideObjectRemoteID = 'content_object_remote_id'
eZContentObjectPackageHandler::$OverrideParentNodeRemoteID = 'parent_content_node_remote_id'
eZContentObjectPackageHandler::$OverrideSettingsArray = array()
eZContentObjectPackageHandler::$Package = null
eZContentObjectPackageHandler::$RootNodeIDArray = array()
eZContentObjectPackageHandler::$RootNodeObjectArray = array()
eZContentObjectPackageHandler::$TemplateFileArray = array()

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