|
eZ Publish
[trunk]
|
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 () | |
| 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 | |
| static | appendLicence ($package) |
| static | creatorLimitationList () |
| static & | creatorList ($checkRoles=false) |
| static | instance ($handlerName) |
| Returns a shared instance of the eZPackageCreationHandler class pr $handlerName as defined in package.ini[CreationSettings]HandlerAlias. | |
| packageChangelogStep () | |
| packageInformationStep () | |
| packageMaintainerStep () | |
| packageThumbnailStep () | |
The class eZPackageCreationHandler does.
Definition at line 18 of file ezpackagecreationhandler.php.
| static eZPackageCreationHandler::appendLicence | ( | $ | package | ) | [static] |
Appends the GPL licence file to the package object $package.
Definition at line 952 of file ezpackagecreationhandler.php.
Referenced by createPackage().
| eZPackageCreationHandler::attribute | ( | $ | name | ) |
Definition at line 104 of file ezpackagecreationhandler.php.
Referenced by generateStepMap(), and stepTemplate().
Definition at line 94 of file ezpackagecreationhandler.php.
| 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.
Definition at line 883 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageChangelog | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Parses the changelog entry text and turns into an array with change entries.
Definition at line 784 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageInformation | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Commits package information.
Definition at line 712 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageMaintainer | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Commits maintainer step data. Does nothing for now.
Definition at line 873 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageThumbnail | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Commits thumbnail step data. Does nothing for now.
Definition at line 944 of file ezpackagecreationhandler.php.
| 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.
Definition at line 237 of file ezpackagecreationhandler.php.
Definition at line 130 of file ezpackagecreationhandler.php.
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.
true if the package was created or false if it was only re-initialized. Definition at line 483 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\finalize(), eZExtensionPackageCreator\finalize(), eZContentObjectPackageCreator\finalize(), and eZStylePackageCreator\finalize().
| static eZPackageCreationHandler::creatorLimitationList | ( | ) | [static] |
Definition at line 263 of file ezpackagecreationhandler.php.
| static& eZPackageCreationHandler::creatorList | ( | $ | checkRoles = false | ) | [static] |
Definition at line 279 of file ezpackagecreationhandler.php.
Referenced by creatorLimitationList().
| eZPackageCreationHandler::eZPackageCreationHandler | ( | $ | id, |
| $ | name, | ||
| $ | steps | ||
| ) |
Constructor
Definition at line 23 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\eZContentClassPackageCreator(), eZContentObjectPackageCreator\eZContentObjectPackageCreator(), eZExtensionPackageCreator\eZExtensionPackageCreator(), and eZStylePackageCreator\eZStylePackageCreator().
| 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.
Reimplemented in eZStylePackageCreator, eZContentObjectPackageCreator, eZExtensionPackageCreator, and eZContentClassPackageCreator.
Definition at line 255 of file ezpackagecreationhandler.php.
| 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.
Reimplemented in eZStylePackageCreator, eZContentObjectPackageCreator, eZExtensionPackageCreator, and eZContentClassPackageCreator.
Definition at line 593 of file ezpackagecreationhandler.php.
Referenced by initializePackageInformation().
| eZPackageCreationHandler::generateStepMap | ( | $ | package, |
| &$ | persistentData | ||
| ) |
Will go over the steps and make sure that:
It will also make sure that steps can be looked up by their ID.
Definition at line 43 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::hasAttribute | ( | $ | name | ) |
Definition at line 99 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::initialChangelogEntry | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Definition at line 454 of file ezpackagecreationhandler.php.
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().
Definition at line 720 of file ezpackagecreationhandler.php.
| 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.
Definition at line 601 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::initializePackageMaintainer | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Initializes the package maintainer step with some values taken from the current user.
Definition at line 821 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::initializePackageThumbnail | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Initializes the package thumbnail step.
Definition at line 913 of file ezpackagecreationhandler.php.
| 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.
Definition at line 161 of file ezpackagecreationhandler.php.
Definition at line 115 of file ezpackagecreationhandler.php.
Referenced by initializeStep().
| static eZPackageCreationHandler::instance | ( | $ | handlerName | ) | [static] |
Returns a shared instance of the eZPackageCreationHandler class pr $handlerName as defined in package.ini[CreationSettings]HandlerAlias.
| string | $handlerName |
Definition at line 336 of file ezpackagecreationhandler.php.
Referenced by creatorList(), eZContentObjectPackageCreator\initializeObjectLimits(), initializePackageInformation(), eZContentObjectPackageCreator\loadObjectLimits(), and validatePackageInformation().
| 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.
Definition at line 177 of file ezpackagecreationhandler.php.
Definition at line 120 of file ezpackagecreationhandler.php.
Referenced by loadStep().
| eZPackageCreationHandler::packageChangelogStep | ( | ) | [static] |
Definition at line 399 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\eZContentClassPackageCreator(), eZContentObjectPackageCreator\eZContentObjectPackageCreator(), eZExtensionPackageCreator\eZExtensionPackageCreator(), and eZStylePackageCreator\eZStylePackageCreator().
| eZPackageCreationHandler::packageInformationStep | ( | ) | [static] |
Definition at line 368 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\eZContentClassPackageCreator(), eZContentObjectPackageCreator\eZContentObjectPackageCreator(), eZExtensionPackageCreator\eZExtensionPackageCreator(), and eZStylePackageCreator\eZStylePackageCreator().
| eZPackageCreationHandler::packageInitialState | ( | $ | package, |
| &$ | persistentData | ||
| ) |
The state of a package generally tells how stable a package is, see eZPackage::stateList() for more information on possible states.
'alpha' Reimplemented in eZStylePackageCreator, eZExtensionPackageCreator, eZContentObjectPackageCreator, and eZContentClassPackageCreator.
Definition at line 443 of file ezpackagecreationhandler.php.
Referenced by createPackage().
| eZPackageCreationHandler::packageInstallType | ( | $ | package, |
| &$ | persistentData | ||
| ) |
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.
Reimplemented in eZStylePackageCreator, and eZExtensionPackageCreator.
Definition at line 431 of file ezpackagecreationhandler.php.
Referenced by createPackage().
| eZPackageCreationHandler::packageMaintainerStep | ( | ) | [static] |
Definition at line 383 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\eZContentClassPackageCreator(), eZContentObjectPackageCreator\eZContentObjectPackageCreator(), eZExtensionPackageCreator\eZExtensionPackageCreator(), and eZStylePackageCreator\eZStylePackageCreator().
| eZPackageCreationHandler::packageThumbnailStep | ( | ) | [static] |
Definition at line 414 of file ezpackagecreationhandler.php.
Referenced by eZStylePackageCreator\eZStylePackageCreator().
| eZPackageCreationHandler::packageType | ( | $ | package, |
| &$ | persistentData | ||
| ) |
false. If the creator should have a specific package type this function should be reimplemented. See eZPackage::typeList() for more information on available types.Reimplemented in eZStylePackageCreator, eZExtensionPackageCreator, eZContentObjectPackageCreator, and eZContentClassPackageCreator.
Definition at line 467 of file ezpackagecreationhandler.php.
Referenced by checkPackageMaintainer(), and createPackage().
Definition at line 139 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::stepTemplate | ( | $ | step | ) |
Definition at line 144 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::validateAndAdvanceStep | ( | $ | package, |
| $ | http, | ||
| $ | currentStepID, | ||
| &$ | stepMap, | ||
| &$ | persistentData, | ||
| &$ | errorList | ||
| ) |
Definition at line 219 of file ezpackagecreationhandler.php.
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.
Definition at line 743 of file ezpackagecreationhandler.php.
| 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.
Definition at line 631 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::validatePackageMaintainer | ( | $ | package, |
| $ | http, | ||
| $ | currentStepID, | ||
| &$ | stepMap, | ||
| &$ | persistentData, | ||
| &$ | errorList | ||
| ) |
Checks if the POST variables has a name and email for the person.
Definition at line 838 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::validatePackageThumbnail | ( | $ | package, |
| $ | http, | ||
| $ | currentStepID, | ||
| &$ | stepMap, | ||
| &$ | persistentData, | ||
| &$ | errorList | ||
| ) |
Checks if the POST variables has a proper thumbnail image.
Definition at line 921 of file ezpackagecreationhandler.php.
| 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.
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. Definition at line 198 of file ezpackagecreationhandler.php.
Definition at line 125 of file ezpackagecreationhandler.php.
Referenced by validateAndAdvanceStep().