API - XOOPS 2.5.11 Beta 2
By monxoops.fr
GenericHelper Class Reference
Inheritance diagram for GenericHelper:
Collaboration diagram for GenericHelper:

Public Member Functions

 init ()
 
 getModule ()
 
 getConfig ($name=null, $default=null)
 
 getHandler ($name)
 
 loadLanguage ($name)
 
 isCurrentModule ()
 
 isUserAdmin ()
 
 url ($url='')
 
 path ($path='')
 
 redirect ($url, $time=3, $message='')
 
 uploadUrl ($url='')
 
 uploadPath ($path='')
 
- Public Member Functions inherited from AbstractHelper
 __construct ($dirname=null)
 
 init ()
 
 dirname ()
 
 setDebug ($bool=true)
 
 addLog ($log)
 

Protected Member Functions

 initObject ()
 
 initConfig ()
 
 initHandler ($name)
 
- Protected Member Functions inherited from AbstractHelper
 serializeForHelperLog ($value)
 

Protected Attributes

 $object
 
 $handlers
 
 $configs
 
- Protected Attributes inherited from AbstractHelper
 $dirname
 
 $module
 
 $debug
 

Member Function Documentation

◆ getConfig()

getConfig (   $name = null,
  $default = null 
)

get a module config item

Parameters
string$namename of config item, or blank for all items
mixed$defaultdefault value to return if config $name is not set
Returns
mixed string config item, array of config items, or null if config not found
Here is the call graph for this function:

◆ getHandler()

getHandler (   $name)

Get an Object Handler

Parameters
string$namename of handler to load
Returns
bool|XoopsObjectHandler|XoopsPersistableObjectHandler
Here is the call graph for this function:

◆ getModule()

getModule ( )

get the module object

Returns
\XoopsModule
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

init ( )

Initialize parent::__construct calls this after verifying module object.

Returns
void

Reimplemented from AbstractHelper.

◆ initConfig()

initConfig ( )
protected

get module configs

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initHandler()

initHandler (   $name)
protected

get a handler instance and store in $this->_handlers

Parameters
string$namename of handler to load
Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initObject()

initObject ( )
protected

get a module object

Returns
void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCurrentModule()

isCurrentModule ( )

Is this the currently active module?

Returns
bool
Here is the call graph for this function:

◆ isUserAdmin()

isUserAdmin ( )

Does user have admin rights to this module?

Returns
bool true is user has admin right, else false
Here is the call graph for this function:

◆ loadLanguage()

loadLanguage (   $name)

load a language file for this module

Parameters
string$namebasename of language file (i.e. 'admin')
Returns
bool
Here is the call graph for this function:

◆ path()

path (   $path = '')

Return absolute filesystem path for a module relative path

Parameters
string$pathmodule relative file system path
Returns
string
Here is the call graph for this function:

◆ redirect()

redirect (   $url,
  $time = 3,
  $message = '' 
)

Redirect the user to a page within this module

Parameters
string$urlmodule relative url (i.e. index.php)
int$timetime in seconds to show redirect message
string$messageredirect message
Returns
void
Here is the call graph for this function:

◆ uploadPath()

uploadPath (   $path = '')

Return absolute filesystem path for a module relative upload file

Uploads may be stored in special directories for many reasons, such as permissions, security, replication and directory balancing Rather than build their own URL's, modules should use this method which will know how to reference the upload now and in the future.

Parameters
string$pathmodule relative upload file path
Returns
string
Here is the call graph for this function:

◆ uploadUrl()

uploadUrl (   $url = '')

Return absolute URL for a module relative upload file

Uploads may be stored in special directories for many reasons, such as permissions, security, replication and directory balancing Rather than build their own URL's, modules should use this method which will know how to reference the upload now and in the future.

Parameters
string$urlmodule relative upload URL
Returns
string
Here is the call graph for this function:

◆ url()

url (   $url = '')

Return absolute URL for a module relative URL

Parameters
string$urlmodule relative URL
Returns
string
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ $configs

$configs
protected

◆ $handlers

$handlers
protected

◆ $object

$object
protected

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