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

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

Inheritance diagram for Legacy_ModuleInstallAction:
Legacy_Action

Public Member Functions

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

Data Fields

 $mInstallSuccess = null
 
 $mInstallFail = null
 
 $mXoopsModule = null
 
 $mInstaller = null
 
 $mActionForm = null
 
- Data Fields inherited from Legacy_Action
 $_mAdminFlag = false
 

Detailed Description

Module Install function having possibility to extend by module developers.

The precondition is that the specified module has been not installed.

The custom-installer

Module developers can use their own custom-installer in this action. Unlike the module update function, the standard installer in this action is perhaps no problems. But, duplicatable modules or some modules with the special framework may need the custom-installer.

Convention

See Legacy_ModuleInstallAction\_getInstaller().

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

You must declare your sub-class of Legacy_ModuleInstaller 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']['installer']['class'] = "Installer";

You must declare News_Installer in XOOPS_ROOT_PATH . "/modules/news/admin/class/Installerr.class.php".

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

Install Process

  • Gets an instance of the installer class through Legacy_ModuleInstallAction\_getInstaller().
  • Sets the new XoopsModule built from xoops_version, to the instance.
  • Sets a value indicating whether an administrator hopes the force-mode, to the instance.
  • Calls executeInstall().
See also
Legacy_ModuleInstallAction\_getInstaller()
Legacy_ModuleInstaller
Legacy_ModuleInstallUtils
Todo
These classes are good to abstract again.

Definition at line 67 of file ModuleInstallAction.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $flag)

Reimplemented from Legacy_Action.

Definition at line 97 of file ModuleInstallAction.class.php.

Member Function Documentation

◆ _getInstaller()

& _getInstaller ( )

Definition at line 144 of file ModuleInstallAction.class.php.

◆ _setupActionForm()

_setupActionForm ( )

Definition at line 151 of file ModuleInstallAction.class.php.

◆ execute()

execute ( & $controller,
& $xoopsUser )

Reimplemented from Legacy_Action.

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

◆ executeViewCancel()

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

Reimplemented from Legacy_Action.

Definition at line 229 of file ModuleInstallAction.class.php.

◆ executeViewInput()

executeViewInput ( & $controller,
& $xoopsUser,
& $renderer )
Parameters
$controller
$xoopsUser
$renderer
Todo
no $renderer. It should be $render.

Reimplemented from Legacy_Action.

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

◆ executeViewSuccess()

executeViewSuccess ( & $controller,
& $xoopsUser,
& $renderer )
Parameters
$controller
$xoopsUser
$renderer
Todo
no $renderer. It should be $render.

Reimplemented from Legacy_Action.

Definition at line 198 of file ModuleInstallAction.class.php.

◆ getDefaultView()

getDefaultView ( & $controller,
& $xoopsUser )

Reimplemented from Legacy_Action.

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

◆ prepare()

prepare ( & $controller,
& $xoopsUser )

Reimplemented from Legacy_Action.

Definition at line 108 of file ModuleInstallAction.class.php.

Field Documentation

◆ $mActionForm

$mActionForm = null

Definition at line 95 of file ModuleInstallAction.class.php.

◆ $mInstaller

$mInstaller = null

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

◆ $mInstallFail

$mInstallFail = null

Definition at line 77 of file ModuleInstallAction.class.php.

◆ $mInstallSuccess

$mInstallSuccess = null

Definition at line 72 of file ModuleInstallAction.class.php.

◆ $mXoopsModule

$mXoopsModule = null

Definition at line 83 of file ModuleInstallAction.class.php.


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