eZPublishCommunityProject(LegacyStack)  2013.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, $requestedInfo=array())
 
 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
 createDependencyNode ($package, &$dependencyNode, $dependencyItem, $dependencySection)
 
 createDependencyText ($package, $dependencyItem, $dependencySection)
 
 createInstallNode ($package, $installNode, $installItem, $installType)
 
 extractInstallContent ()
 
 eZPackageHandler ($handlerType, $parameters=array())
 
 handlerType ()
 
 isErrorElement ($elementID, &$installParameters)
 
 parseDependencyNode ($package, &$dependencyNode, &$dependencyParameters, $dependencySection)
 
 parseInstallNode ($package, $installNode, &$installParameters, $isInstall)
 
 reset ()
 

Static Public Member Functions

static createArrayFromDOMNode ($domNode)
 
static createElementNodeFromArray ($name, $array)
 
- Static Public Member Functions inherited from eZPackageHandler
static errorChoosenAction ($errorCode, &$installParameters, $description, $handlerType, $resetError=true)
 

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()
 
const INSTALL_OBJECTS_ERROR_RANGE_FROM = 1
 
const INSTALL_OBJECTS_ERROR_RANGE_TO = 100
 
const MAX_LISTED_OBJECTS = 30
 
const STORE_OBJECTS_TO_SEPARATE_FILES_THRESHOLD = 100
 
const UNINSTALL_OBJECTS_ERROR_RANGE_FROM = 101
 
const UNINSTALL_OBJECTS_ERROR_RANGE_TO = 200
 

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 
)
virtual

Adds items defined in $parameters to the package $package.

Implements eZPackageHandler.

eZContentObjectPackageHandler::addNode (   $nodeID,
  $isSubtree = true 
)

Add Node list to ezcontentobject package handler.

Parameters
nodeIDnode id
isSubtreesubtree (optional, default true )

Referenced by add().

eZContentObjectPackageHandler::contentObjectDirectory ( )
static eZContentObjectPackageHandler::createArrayFromDOMNode (   $domNode)
static

Creates recursive array from DOMNodeElement

Referenced by installFetchAliases(), and installOverrides().

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().

static eZContentObjectPackageHandler::createElementNodeFromArray (   $name,
  $array 
)
static

Creates DOMNodeElement recursivly from recursive array

Referenced by generateFetchAliasArray(), and generateOverrideSettingsArray().

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,
  $requestedInfo = array() 
)
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
nodeAssignmentwhich node assignments to include, either 'selected' or 'main'

Referenced by generatePackage().

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

Get all template overrides used by exported objects

Parameters
siteAccessArraysite access 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

Called when command line parameters must be handled by the package handler. This function must return an array with values which can easily be used in the add() function.

Parameters
$packageTypeThe type that was specified when using the add command, which is either the name of this handler or an alias for it.
$packageThe package object.
$cliCommand line interface object, can be used to output errors etc.
$argumentsAn array with string values taken from the command line after the add command.

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
objectNodesobject-list DOMNode
topNodeListNode
installParametersinstall parameters

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 
)
virtual

Uninstalls all previously installed content objects.

Implements eZPackageHandler.

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()
const eZContentObjectPackageHandler::INSTALL_OBJECTS_ERROR_RANGE_FROM = 1
const eZContentObjectPackageHandler::INSTALL_OBJECTS_ERROR_RANGE_TO = 100
const eZContentObjectPackageHandler::MAX_LISTED_OBJECTS = 30
const eZContentObjectPackageHandler::STORE_OBJECTS_TO_SEPARATE_FILES_THRESHOLD = 100
const eZContentObjectPackageHandler::UNINSTALL_OBJECTS_ERROR_RANGE_FROM = 101
const eZContentObjectPackageHandler::UNINSTALL_OBJECTS_ERROR_RANGE_TO = 200

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