XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
Legacy_ModuleUpdateAction Class Reference

Module Update function having possibility to extend by module developers. More...

Inheritance diagram for Legacy_ModuleUpdateAction:
Legacy_Action

Public Member Functions

 prepare (&$controller, &$xoopsUser)
 
 _setupActionForm ()
 
_getInstaller ()
 
 getDefaultView (&$controller, &$xoopsUser)
 
 execute (&$controller, &$xoopsUser)
 
 executeViewSuccess (&$controller, &$xoopsUser, &$renderer)
 
 executeViewInput (&$controller, &$xoopsUser, &$renderer)
 
 executeViewCancel (&$controller, &$xoopsUser, &$renderer)
 
- Public Member Functions inherited from Legacy_Action
 Legacy_Action ($adminFlag=false)
 
 __construct ($adminFlag=false)
 
 hasPermission (&$controller, &$xoopsUser)
 
 executeViewError (&$controller, &$xoopsUser, &$render)
 
 executeViewIndex (&$controller, &$xoopsUser, &$render)
 
 executeViewPreview (&$controller, &$xoopsUser, &$render)
 

Data Fields

 $mUpdateSuccess = null
 
 $mUpdateFail = null
 
 $mXoopsModule = null
 
 $mInstaller = null
 
- Data Fields inherited from Legacy_Action
 $_mAdminFlag = false
 

Protected Attributes

 $mActionForm
 
 $mErrorMessages
 
 $mModuleObjects
 

Detailed Description

Module Update function having possibility to extend by module developers.

The precondition is that the specified module has been installed.

The custom-update-installer

Module developers can use their own custom-update-installer in this action. This function uses Legacy_ModulePhasedUpgrader to update modules. But, this class can't smart update modules correctly & automatically, because the module update function bases on XOOPS2 JP spec. We have no rules to declare modules strictly.

To solve it, module developers should use the custom-update-installer, because module developers know detail changelog of their module.

Convention

See Legacy_ModuleUpdateAction\_getInstaller().

  • $modversion['legacy_installer']['updater']['class'] = {classname};
  • $modversion['legacy_installer']['updater']['namespace'] = {namespace}; (Optional)
  • $modversion['legacy_installer']['updater']['filepath'] = {filepath}; (Optional)

You must declare your sub-class of Legacy_ModulePhasedUpgrader as {namespace}_{classname} in {filepath}. You must specify classname. Others are decided by the naming convention without your descriptions. Namespace is ucfirst(dirname). Filepath is "admin/class/{classname}.class.php".

For example, "news" module.

$modversion['legacy_installer']['updater']['class'] = "Updater";

You must declare News_Updater in XOOPS_ROOT_PATH . "/modules/news/admin/class/Updater.class.php".

In the case where you specify the filepath, take care to describe the filepath with absolute path.

Install Process

  • Gets an instance of the update installer class through Legacy_ModuleUpdateAction\_getInstaller().
  • Sets the current XoopsModule to the instance.
  • Builds the target XoopsModule from xoops_version, and sets it to the instance.
  • Sets a value indicating whether an administrator hopes the force-mode, to the instance.
  • Calls executeUpgrade().
See also
Legacy_ModuleUpdateAction\_getInstaller()
Legacy_ModulePhasedUpgrader
Legacy_ModuleInstallUtils

Definition at line 70 of file ModuleUpdateAction.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 100 of file ModuleUpdateAction.class.php.

Member Function Documentation

◆ _getInstaller()

& _getInstaller ( )

Creates an instance of the upgrade installer to mInstaller. And returns it.

The precondition is the existence of mXoopsModule.

Definition at line 157 of file ModuleUpdateAction.class.php.

◆ _setupActionForm()

_setupActionForm ( )

Definition at line 145 of file ModuleUpdateAction.class.php.

◆ execute()

execute ( & $controller,
& $xoopsUser )

Reimplemented from Legacy_Action.

Definition at line 171 of file ModuleUpdateAction.class.php.

◆ executeViewCancel()

executeViewCancel ( & $controller,
& $xoopsUser,
& $renderer )

Reimplemented from Legacy_Action.

Definition at line 221 of file ModuleUpdateAction.class.php.

◆ executeViewInput()

executeViewInput ( & $controller,
& $xoopsUser,
& $renderer )

Reimplemented from Legacy_Action.

Definition at line 211 of file ModuleUpdateAction.class.php.

◆ executeViewSuccess()

executeViewSuccess ( & $controller,
& $xoopsUser,
& $renderer )

Reimplemented from Legacy_Action.

Definition at line 190 of file ModuleUpdateAction.class.php.

◆ getDefaultView()

getDefaultView ( & $controller,
& $xoopsUser )

Reimplemented from Legacy_Action.

Definition at line 164 of file ModuleUpdateAction.class.php.

◆ prepare()

prepare ( & $controller,
& $xoopsUser )

Reimplemented from Legacy_Action.

Definition at line 114 of file ModuleUpdateAction.class.php.

Field Documentation

◆ $mActionForm

$mActionForm
protected

Definition at line 89 of file ModuleUpdateAction.class.php.

◆ $mErrorMessages

$mErrorMessages
protected

Definition at line 94 of file ModuleUpdateAction.class.php.

◆ $mInstaller

$mInstaller = null

Definition at line 84 of file ModuleUpdateAction.class.php.

◆ $mModuleObjects

$mModuleObjects
protected

Definition at line 99 of file ModuleUpdateAction.class.php.

◆ $mUpdateFail

$mUpdateFail = null

Definition at line 80 of file ModuleUpdateAction.class.php.

◆ $mUpdateSuccess

$mUpdateSuccess = null

Definition at line 75 of file ModuleUpdateAction.class.php.

◆ $mXoopsModule

$mXoopsModule = null

Definition at line 82 of file ModuleUpdateAction.class.php.


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