eZPublish  3.8
eZPackageCreationHandler Class Reference

The class eZPackageCreationHandler does. More...

+ Inheritance diagram for eZPackageCreationHandler:

Public Member Functions

attribute ($name)
 
 attributes ()
 
 checkPackageMaintainer (&$package, &$persistentData)
 
 commitPackageChangelog (&$package, &$http, $step, &$persistentData, &$tpl)
 
 commitPackageInformation (&$package, &$http, $step, &$persistentData, &$tpl)
 
 commitPackageMaintainer (&$package, &$http, $step, &$persistentData, &$tpl)
 
 commitPackageThumbnail (&$package, &$http, $step, &$persistentData, &$tpl)
 
 commitStep (&$package, &$http, $step, &$persistentData, &$tpl)
 
 commitStepMethodMap ()
 
 createPackage (&$package, &$http, &$persistentData, &$cleanupFiles, $storePackage=true)
 
 eZPackageCreationHandler ($id, $name, $steps)
 
 finalize (&$package, &$http, &$persistentData)
 
 generatePackageInformation (&$packageInformation, &$package, &$http, $step, &$persistentData)
 
 generateStepMap (&$package, &$persistentData)
 
 hasAttribute ($name)
 
 initialChangelogEntry (&$package, &$http, $step, &$persistentData, &$tpl)
 
 initializePackageChangelog (&$package, &$http, $step, &$persistentData, &$tpl)
 
 initializePackageInformation (&$package, &$http, $step, &$persistentData, &$tpl)
 
 initializePackageMaintainer (&$package, &$http, $step, &$persistentData, &$tpl)
 
 initializePackageThumbnail (&$package, &$http, $step, &$persistentData, &$tpl)
 
 initializeStep (&$package, &$http, $step, &$persistentData, &$tpl)
 
 initializeStepMethodMap ()
 
instance ($handlerName)
 
 loadStep (&$package, &$http, $currentStepID, &$persistentData, &$tpl, &$module)
 
 loadStepMethodMap ()
 
 packageInitialState (&$package, &$persistentData)
 
 packageInstallType (&$package, &$persistentData)
 
 packageType (&$package, &$persistentData)
 
stepMap ()
 
 stepTemplate ($step)
 
 validateAndAdvanceStep (&$package, &$http, $currentStepID, &$stepMap, &$persistentData, &$errorList)
 
 validatePackageChangelog (&$package, &$http, $currentStepID, &$stepMap, &$persistentData, &$errorList)
 
 validatePackageInformation (&$package, &$http, $currentStepID, &$stepMap, &$persistentData, &$errorList)
 
 validatePackageMaintainer (&$package, &$http, $currentStepID, &$stepMap, &$persistentData, &$errorList)
 
 validatePackageThumbnail (&$package, &$http, $currentStepID, &$stepMap, &$persistentData, &$errorList)
 
 validateStep (&$package, &$http, $currentStepID, &$stepMap, &$persistentData, &$errorList)
 
 validateStepMethodMap ()
 

Static Public Member Functions

 appendLicence (&$package)
 
 creatorLimitationList ()
 
creatorList ($checkRoles=false)
 
 packageChangelogStep ()
 
 packageInformationStep ()
 
 packageMaintainerStep ()
 
 packageThumbnailStep ()
 

Detailed Description

The class eZPackageCreationHandler does.

Member Function Documentation

eZPackageCreationHandler::appendLicence ( $package)
static

Appends the GPL licence file to the package object $package.

Referenced by createPackage().

& eZPackageCreationHandler::attribute (   $name)

Referenced by generateStepMap(), and stepTemplate().

eZPackageCreationHandler::attributes ( )
eZPackageCreationHandler::checkPackageMaintainer ( $package,
$persistentData 
)

Checks if the maintainer step is required and return true if so, otherwise false. The maintainer step is not required if the user has no maintainer roles to use or if the package already has a maintainer with the same name as the current user.

eZPackageCreationHandler::commitPackageChangelog ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Parses the changelog entry text and turns into an array with change entries.

eZPackageCreationHandler::commitPackageInformation ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Commits package information.

eZPackageCreationHandler::commitPackageMaintainer ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Commits maintainer step data. Does nothing for now.

eZPackageCreationHandler::commitPackageThumbnail ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Commits thumbnail step data. Does nothing for now.

eZPackageCreationHandler::commitStep ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

This is called after a step has validated it's information. It can be used to put values in the $persistentData variable for later retrieval.

eZPackageCreationHandler::commitStepMethodMap ( )

Referenced by commitStep().

eZPackageCreationHandler::createPackage ( $package,
$http,
$persistentData,
$cleanupFiles,
  $storePackage = true 
)

Creates a new package in $package and initializes it with the basic data. The information is taken from the $persistentData which must be filled in prior to this function is called.

Returns
true if the package was created or false if it was only re-initialized.
See Also
packageType, packageInitialState and packageInstallType

Referenced by eZExtensionPackageCreator\finalize(), eZContentClassPackageCreator\finalize(), eZStylePackageCreator\finalize(), and eZContentObjectPackageCreator\finalize().

eZPackageCreationHandler::creatorLimitationList ( )
static
Returns
a list of the available creators usable as a limitation in the role system.
& eZPackageCreationHandler::creatorList (   $checkRoles = false)
static
Returns
a list of the available creators.

Referenced by creatorLimitationList().

eZPackageCreationHandler::finalize ( $package,
$http,
$persistentData 
)

Finalizes the creation process with the gathered information. This is usually the function that creates the package and adds the proper elements.

eZPackageCreationHandler::generatePackageInformation ( $packageInformation,
$package,
$http,
  $step,
$persistentData 
)

This is called on the package information step to initialize the name, summary and description fields. Reimplementing this function allows the creator to fill in some default values for the information fields.

Note
The default does nothing.

Referenced by initializePackageInformation().

eZPackageCreationHandler::generateStepMap ( $package,
$persistentData 
)

Will go over the steps and make sure that:

  • The next and previous links are correct
  • Steps that aren't needed are removed

    It will also make sure that steps can be looked up by their ID.

eZPackageCreationHandler::hasAttribute (   $name)
eZPackageCreationHandler::initialChangelogEntry ( $package,
$http,
  $step,
$persistentData,
$tpl 
)
Returns
The initial changelog entry for a package. It is possible to get different initial texts by reimplementing this function.
Note
This function is called from initializePackageChangelog()

Referenced by initializePackageChangelog().

eZPackageCreationHandler::initializePackageChangelog ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Initializes the package changelog step with some values taken from the current users and the funcvtion initialChangelogEntry().

eZPackageCreationHandler::initializePackageInformation ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Initializes the package information step with some default values. It will call generatePackageInformation() after the values are initialized.

eZPackageCreationHandler::initializePackageMaintainer ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Initializes the package maintainer step with some values taken from the current user.

eZPackageCreationHandler::initializePackageThumbnail ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

Initializes the package thumbnail step.

eZPackageCreationHandler::initializeStep ( $package,
$http,
  $step,
$persistentData,
$tpl 
)

This is called the first time the step is entered (ie. not on validations) and can be used to fill in values in the $persistentData variable for use in the template or later retrieval.

eZPackageCreationHandler::initializeStepMethodMap ( )

Referenced by initializeStep().

& eZPackageCreationHandler::instance (   $handlerName)
Returns
the package creation handler object for the handler named $handlerName.

Referenced by creatorList().

eZPackageCreationHandler::loadStep ( $package,
$http,
  $currentStepID,
$persistentData,
$tpl,
$module 
)

Called each time a step is loaded, and can be used to fetch and process input data in each step.

eZPackageCreationHandler::loadStepMethodMap ( )

Referenced by loadStep().

eZPackageCreationHandler::packageChangelogStep ( )
static
eZPackageCreationHandler::packageInformationStep ( )
static
eZPackageCreationHandler::packageInitialState ( $package,
$persistentData 
)
Returns
the initial state of the package.

The state of a package generally tells how stable a package is, see eZPackage::stateList() for more information on possible states.

Note
The default returns 'alpha'

Referenced by createPackage().

eZPackageCreationHandler::packageInstallType ( $package,
$persistentData 
)
Returns
the type installation this package uses.

This method is called from the createPackage() method and will return 'install' by default. If you want the creator to have a different install type reimplement this function in the creator.

Referenced by createPackage().

eZPackageCreationHandler::packageMaintainerStep ( )
static
eZPackageCreationHandler::packageThumbnailStep ( )
static
Returns
A ready to use creation step which takes care of fetching a thumbnail image.

Referenced by eZStylePackageCreator\eZStylePackageCreator().

eZPackageCreationHandler::packageType ( $package,
$persistentData 
)
Returns
The package type taken from $package if the package exists, otherwise false. If the creator should have a specific package type this function should be reimplemented. See eZPackage::typeList() for more information on available types.
Note
This function is called from createPackage and checkPackageMaintainer()

Referenced by checkPackageMaintainer(), and createPackage().

& eZPackageCreationHandler::stepMap ( )
Returns
a process step map which has proper next/previous links, method maps and allows lookup of steps by ID.
eZPackageCreationHandler::stepTemplate (   $step)
eZPackageCreationHandler::validateAndAdvanceStep ( $package,
$http,
  $currentStepID,
$stepMap,
$persistentData,
$errorList 
)

Referenced by validateStep().

eZPackageCreationHandler::validatePackageChangelog ( $package,
$http,
  $currentStepID,
$stepMap,
$persistentData,
$errorList 
)

Checks if the POST variables contains a name and email for the changelog person and the changelog field contains some text.

eZPackageCreationHandler::validatePackageInformation ( $package,
$http,
  $currentStepID,
$stepMap,
$persistentData,
$errorList 
)

Reads in the package information values from POST variables and makes sure that the package name and package summary is filled in, the version is in correct format and that a package does not already exists with the same name.

eZPackageCreationHandler::validatePackageMaintainer ( $package,
$http,
  $currentStepID,
$stepMap,
$persistentData,
$errorList 
)

Checks if the POST variables has a name and email for the person.

eZPackageCreationHandler::validatePackageThumbnail ( $package,
$http,
  $currentStepID,
$stepMap,
$persistentData,
$errorList 
)

Checks if the POST variables has a proper thumbnail image.

eZPackageCreationHandler::validateStep ( $package,
$http,
  $currentStepID,
$stepMap,
$persistentData,
$errorList 
)

This is called after a step is finished. Reimplement this function to validate the step values and give back errors.

Returns
false if the next step should not be fetched (ie. errors) or true if the all is OK and the next step should be fetched. It is also possible to return a step identifier, in which case this will be the next step.
eZPackageCreationHandler::validateStepMethodMap ( )

Referenced by validateAndAdvanceStep().


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