|
eZ Publish
[4.2]
|
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 41 of file ezpackagecreationhandler.php.
| static eZPackageCreationHandler::appendLicence | ( | $ | package | ) | [static] |
Appends the GPL licence file to the package object $package.
Definition at line 975 of file ezpackagecreationhandler.php.
Referenced by createPackage().
| eZPackageCreationHandler::attribute | ( | $ | name | ) |
Definition at line 127 of file ezpackagecreationhandler.php.
Referenced by generateStepMap(), and stepTemplate().
| eZPackageCreationHandler::attributes | ( | ) |
Definition at line 117 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 906 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 807 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageInformation | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Commits package information.
Definition at line 735 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageMaintainer | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Commits maintainer step data. Does nothing for now.
Definition at line 896 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitPackageThumbnail | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Commits thumbnail step data. Does nothing for now.
Definition at line 967 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 260 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::commitStepMethodMap | ( | ) |
Definition at line 153 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 506 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\finalize(), eZExtensionPackageCreator\finalize(), eZContentObjectPackageCreator\finalize(), and eZStylePackageCreator\finalize().
| static eZPackageCreationHandler::creatorLimitationList | ( | ) | [static] |
Definition at line 286 of file ezpackagecreationhandler.php.
| static& eZPackageCreationHandler::creatorList | ( | $ | checkRoles = false | ) | [static] |
Definition at line 302 of file ezpackagecreationhandler.php.
Referenced by creatorLimitationList().
| eZPackageCreationHandler::eZPackageCreationHandler | ( | $ | id, |
| $ | name, | ||
| $ | steps | ||
| ) |
Constructor
Definition at line 46 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 278 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 616 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 66 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::hasAttribute | ( | $ | name | ) |
Definition at line 122 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::initialChangelogEntry | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Definition at line 477 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 743 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 624 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 844 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::initializePackageThumbnail | ( | $ | package, |
| $ | http, | ||
| $ | step, | ||
| &$ | persistentData, | ||
| $ | tpl | ||
| ) |
Initializes the package thumbnail step.
Definition at line 936 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 184 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::initializeStepMethodMap | ( | ) |
Definition at line 138 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.
| $handlerName | string |
Definition at line 359 of file ezpackagecreationhandler.php.
Referenced by creatorList(), eZContentObjectPackageCreator\initializeObjectLimits(), initializePackageInformation(), eZExtensionPackageCreator\loadExtensionName(), 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 200 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::loadStepMethodMap | ( | ) |
Definition at line 143 of file ezpackagecreationhandler.php.
Referenced by loadStep().
| eZPackageCreationHandler::packageChangelogStep | ( | ) | [static] |
Definition at line 422 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\eZContentClassPackageCreator(), eZContentObjectPackageCreator\eZContentObjectPackageCreator(), eZExtensionPackageCreator\eZExtensionPackageCreator(), and eZStylePackageCreator\eZStylePackageCreator().
| eZPackageCreationHandler::packageInformationStep | ( | ) | [static] |
Definition at line 391 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 466 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 454 of file ezpackagecreationhandler.php.
Referenced by createPackage().
| eZPackageCreationHandler::packageMaintainerStep | ( | ) | [static] |
Definition at line 406 of file ezpackagecreationhandler.php.
Referenced by eZContentClassPackageCreator\eZContentClassPackageCreator(), eZContentObjectPackageCreator\eZContentObjectPackageCreator(), eZExtensionPackageCreator\eZExtensionPackageCreator(), and eZStylePackageCreator\eZStylePackageCreator().
| eZPackageCreationHandler::packageThumbnailStep | ( | ) | [static] |
Definition at line 437 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 490 of file ezpackagecreationhandler.php.
Referenced by checkPackageMaintainer(), and createPackage().
| & eZPackageCreationHandler::stepMap | ( | ) |
Definition at line 162 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::stepTemplate | ( | $ | step | ) |
Definition at line 167 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::validateAndAdvanceStep | ( | $ | package, |
| $ | http, | ||
| $ | currentStepID, | ||
| &$ | stepMap, | ||
| &$ | persistentData, | ||
| &$ | errorList | ||
| ) |
Definition at line 242 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 766 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 654 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 861 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 944 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 221 of file ezpackagecreationhandler.php.
| eZPackageCreationHandler::validateStepMethodMap | ( | ) |
Definition at line 148 of file ezpackagecreationhandler.php.
Referenced by validateAndAdvanceStep().