Class: RCCWP_CustomWriteModule

Source Location: /RCCWP_CustomWriteModule.php

Class Overview [line 12]


Create/edit/delete modules

Author(s):

Version:

Copyright:

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods



Class Details

Create/edit/delete modules

[ Top ]


Class Variables


Class Methods

Create

the Create( string $name, string $description, [boolean $create_folders = true])

[line 44]

Create a new module

Tags:

  • return - id of the module or -1 if the module name already exist

Parameters:

  • string $name - module name, the name will be sanitized.
  • string $description - module description
  • boolean $create_folders - whether to create a folder for the module containing sample template

[ Top ]

Delete

void Delete( [integer $customWriteModuleId = null])

[line 148]

Deletes a module and all its child fields as well as the module folder.

Parameters:

  • integer $customWriteModuleId - module id.

[ Top ]

Get

an Get( integer $customWriteModuleId)

[line 209]

Retrieves the basic information of the module.

Tags:

  • return - object containing id, name and description

Parameters:

  • integer $customWriteModuleId - module id

[ Top ]

GetByName

an GetByName( string $customWriteModuleName)

[line 227]

Retrieves the basic information of the module given module name.

Tags:

  • return - object containing id, name and description

Parameters:

  • string $customWriteModuleName - module name

[ Top ]

GetCustomModules

array GetCustomModules( )

[line 20]

Get all modules

Tags:

  • return - of objects containing all modules.

Parameters:

[ Top ]

Import

the Import( string $zipFilePath, [string $moduleName = false])

[line 301]

Import a module given the zip file path. Importing a module means inserting it in the database and copying its folder to modules folder. If a module with the same name already exists, the function will append a number to the module name. You must have either php ZipArchive extension or unzip program installed.

Tags:

  • return - module id, or false in case of error.

Parameters:

  • string $zipFilePath - the full path of the zip file
  • string $moduleName - the module name, if this value if false, the function will use the zip filename as the module name. The default value is false

[ Top ]

Update

the Update( integer $customWriteModuleId, string $name, string $description)

[line 248]

Updates the basic information of a module

Tags:

  • return - id of the module or -1 if the module name already exist

Parameters:

  • integer $customWriteModuleId - the id of the module that will be updated
  • string $name - new name
  • string $description - new description

[ Top ]


Class Constants


Documentation generated on Tue, 09 Sep 2008 12:47:59 +0000 by phpDocumentor 1.4.2