Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
eZContentClassPackageHandler Class Reference

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

Inheritance diagram for eZContentClassPackageHandler:

## Public Member Functions
| __construct ()
| explainInstallItem ( $package, $installItem, $requestedInfo=array( 'name', 'identifier', 'description', 'language_info'))
| uninstall ( $package, $installType, $parameters, $name, $os, $filename, $subdirectory, $content, &$installParameters, &$installData)
| install ( $package, $installType, $parameters, $name, $os, $filename, $subdirectory, $content, &$installParameters, &$installData)
| add ( $packageType, $package, $cli, $parameters)
| handleAddParameters ( $packageType, $package, $cli, $arguments)
| contentclassDirectory ()
Public Member Functions inherited from eZPackageHandler
| __construct ( $handlerType, $parameters=array())
| extractInstallContent ()
| handlerType ()
| reset ()
| createDependencyNode ( $package, &$dependencyNode, $dependencyItem, $dependencySection)
| parseDependencyNode ( $package, &$dependencyNode, &$dependencyParameters, $dependencySection)
| createDependencyText ( $package, $dependencyItem, $dependencySection)
| createInstallNode ( $package, $installNode, $installItem, $installType)
| parseInstallNode ( $package, $installNode, &$installParameters, $isInstall)
| isErrorElement ( $elementID, &$installParameters)

## Static Public Member Functions
static | addClass ( $package, $classID, $classIdentifier=false)
static | classDOMTree ( $class)
Static Public Member Functions inherited from eZPackageHandler
static | errorChoosenAction ( $errorCode, &$installParameters, $description, $handlerType, $resetError=true)

## Public Attributes
| $HandlerType
const | ERROR_EXISTS = 1
const | ERROR_HAS_OBJECTS = 101
const | ACTION_REPLACE = 1
const | ACTION_SKIP = 2
const | ACTION_NEW = 3
const | ACTION_DELETE = 4
Public Attributes inherited from eZPackageHandler
| $ExtractInstallContent
| $HandlerType

## Private Member Functions
| handleParameters ( $packageType, $package, $cli, $type, $arguments)

## Detailed Description

Handles content classes in the package system.

Definition at line 17 of file ezcontentclasspackagehandler.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZContentClassPackageHandler::__construct | ( |  | ) |

Definition at line 28 of file ezcontentclasspackagehandler.php.

## Member Function Documentation

## ◆ add()

eZContentClassPackageHandler::add | ( |  | $packageType,
|  |  | $package,
|  |  | $cli,
|  |  | $parameters
| ) |  |
| virtual

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

Implements eZPackageHandler.

Definition at line 407 of file ezcontentclasspackagehandler.php.

References addClass().

## ◆ addClass()

static eZContentClassPackageHandler::addClass | ( |  | $package,
|  |  | $classID,
|  |  | $classIdentifier = `false`
| ) |  |
| static

Adds the content class with ID $classID to the package. If $classIdentifier is `false` then it will be fetched from the class.

Definition at line 424 of file ezcontentclasspackagehandler.php.

References classDOMTree(), and eZContentClass\fetch().

Referenced by add(), and eZContentObjectPackageHandler\generatePackage().

## ◆ classDOMTree()

static eZContentClassPackageHandler::classDOMTree | ( |  | $class | ) |
| static

Creates the DOM tree for the content class $class and returns the root node.

Definition at line 533 of file ezcontentclasspackagehandler.php.

References eZContentClassGroup\fetch(), eZContentClassClassGroup\fetchGroupList(), eZContentObjectTreeNode\sortFieldName(), and eZDebug\writeDebug().

Referenced by addClass().

## ◆ contentclassDirectory()

eZContentClassPackageHandler::contentclassDirectory | ( |  | ) |

Definition at line 711 of file ezcontentclasspackagehandler.php.

## ◆ explainInstallItem()

eZContentClassPackageHandler::explainInstallItem | ( |  | $package,
|  |  | $installItem,
|  |  | $requestedInfo = `array( 'name', 'identifier', 'description', 'language_info' )`
| ) |  |
| virtual

Returns an explanation for the content class install item. Use $requestedInfo to request portion of info.

Implements eZPackageHandler.

Definition at line 37 of file ezcontentclasspackagehandler.php.

References ezpI18n\tr().

## ◆ handleAddParameters()

eZContentClassPackageHandler::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

  $packageType | The type that was specified when using the add command, which is either the name of this handler or an alias for it.
  $package | The package object.
  $cli | Command line interface object, can be used to output errors etc.
  $arguments | An array with string values taken from the command line after the add command.

Implements eZPackageHandler.

Definition at line 445 of file ezcontentclasspackagehandler.php.

References handleParameters().

## ◆ handleParameters()

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

Definition at line 453 of file ezcontentclasspackagehandler.php.

References eZContentClass\exists(), and eZContentClass\fetch().

Referenced by handleAddParameters().

## ◆ install()

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

Creates a new contentclass as defined in the xml structure.

Implements eZPackageHandler.

Definition at line 153 of file ezcontentclasspackagehandler.php.

References ACTION_NEW, ACTION_REPLACE, ACTION_SKIP, eZContentClassAttribute\create(), eZContentClassGroup\create(), eZContentClass\create(), eZPackageHandler\errorChoosenAction(), eZContentClass\fetchByIdentifier(), eZContentClassGroup\fetchByName(), eZContentClass\fetchByRemoteID(), eZContentObject\fetchSameClassListCount(), eZRemoteIdUtility\generate(), eZPackage\NON_INTERACTIVE, eZContentClassOperations\remove(), eZContentObjectTreeNode\sortFieldID(), ezpI18n\tr(), eZDebug\writeNotice(), and eZDebug\writeWarning().

## ◆ uninstall()

eZContentClassPackageHandler::uninstall | ( |  | $package,
|  |  | $installType,
|  |  | $parameters,
|  |  | $name,
|  |  | $os,
|  |  | $filename,
|  |  | $subdirectory,
|  |  | $content,
|  | & | $installParameters,
|  | & | $installData
| ) |  |
| virtual

Uninstalls all previously installed content classes.

Implements eZPackageHandler.

Definition at line 100 of file ezcontentclasspackagehandler.php.

References eZPackageHandler\errorChoosenAction(), eZContentClass\fetchByRemoteID(), eZContentObject\fetchSameClassListCount(), eZContentClassOperations\remove(), ezpI18n\tr(), and eZDebug\writeNotice().

## Member Data Documentation

## ◆ $HandlerType

eZContentClassPackageHandler::$HandlerType

Definition at line 19 of file ezcontentclasspackagehandler.php.

## ◆ ACTION_DELETE

const eZContentClassPackageHandler::ACTION_DELETE = 4

Definition at line 26 of file ezcontentclasspackagehandler.php.

## ◆ ACTION_NEW

const eZContentClassPackageHandler::ACTION_NEW = 3

Definition at line 25 of file ezcontentclasspackagehandler.php.

Referenced by install().

## ◆ ACTION_REPLACE

const eZContentClassPackageHandler::ACTION_REPLACE = 1

Definition at line 23 of file ezcontentclasspackagehandler.php.

Referenced by install().

## ◆ ACTION_SKIP

const eZContentClassPackageHandler::ACTION_SKIP = 2

Definition at line 24 of file ezcontentclasspackagehandler.php.

Referenced by install().

## ◆ ERROR_EXISTS

const eZContentClassPackageHandler::ERROR_EXISTS = 1

Definition at line 20 of file ezcontentclasspackagehandler.php.

## ◆ ERROR_HAS_OBJECTS

const eZContentClassPackageHandler::ERROR_HAS_OBJECTS = 101

Definition at line 21 of file ezcontentclasspackagehandler.php.

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

- ezcontentclasspackagehandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.