Overview

Namespaces

  • Composer
    • Autoload
  • Geekwright
    • RegDom
  • League
    • OAuth2
      • Client
        • Provider
  • None
  • Xmf
    • Database
    • Jwt
    • Key
    • Module
      • Helper

Classes

  • AbstractHelper
  • Cache
  • GenericHelper
  • Permission
  • Session
  • Overview
  • Namespace
  • Class
  • Tree

Class GenericHelper

GenericHelper implements a Xoops 2.6 Xoops\Module\Helper\HelperAbstract. We use it pre 2.6 systems so we can encapsulate many of the changes needed to make modules more compatible with 2.6 in these methods. The most common deprecated warnings can be avoided by using module helper methods.

Direct known subclasses

Xmf\Module\Helper
Abstract
Namespace: Xmf\Module\Helper
Package: Xmf
Category: Xmf\Module\Helper\GenericHelper
Copyright: 2011-2016 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: trabis lusopoemas@gmail.com
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php
Methods summary
protected
# __construct( string $dirname )

class constructor

class constructor

Parameters

$dirname
a module directory name
public XoopsModule
# getModule( )

get the module object

get the module object

Returns

XoopsModule
public mixed
# getConfig( string $name = null, mixed $default = null )

get a module config item

get a module config item

Parameters

$name
name of config item, or blank for all items
$default
default value to return if config $name is not set

Returns

mixed

string config item, array of config items, or null if config not found

public boolean|XoopsObjectHandler|XoopsPersistableObjectHandler
# getHandler( string $name )

Get an Object Handler

Get an Object Handler

Parameters

$name
name of handler to load

Returns

boolean|XoopsObjectHandler|XoopsPersistableObjectHandler
protected
# initObject( )

get a module object

get a module object

protected
# initConfig( )

get module configs

get module configs

protected
# initHandler( string $name )

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

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

Parameters

$name
name of handler to load
public boolean
# loadLanguage( string $name )

load a language file for this module

load a language file for this module

Parameters

$name
basename of language file (i.e. 'admin')

Returns

boolean
public
# setDebug( boolean $bool = true )

Set debug option on or off

Set debug option on or off

Parameters

$bool
true to turn on debug logging, false for off
public
# addLog( string $log )

Add a message to the module log

Add a message to the module log

Parameters

$log
log message
public boolean
# isCurrentModule( )

Is this the currently active module?

Is this the currently active module?

Returns

boolean
public boolean
# isUserAdmin( )

Does user have admin rights to this module?

Does user have admin rights to this module?

Returns

boolean
true is user has admin right, else false
public string
# url( string $url = '' )

Return absolute URL for a module relative URL

Return absolute URL for a module relative URL

Parameters

$url
module relative URL

Returns

string
public string
# path( string $path = '' )

Return absolute filesystem path for a module relative path

Return absolute filesystem path for a module relative path

Parameters

$path
module relative file system path

Returns

string
public
# redirect( string $url, integer $time = 3, string $message = '' )

Redirect the user to a page within this module

Redirect the user to a page within this module

Parameters

$url
module relative url (i.e. index.php)
$time
time in seconds to show redirect message
$message
redirect message
Properties summary
protected string $dirname

module directory name

module directory name

#
protected XoopsModule $object
#
protected array $handlers

of XoopsObjectHandler|XoopsPersistableObjectHandler

of XoopsObjectHandler|XoopsPersistableObjectHandler

#
protected array $configs

config items

config items

#
protected boolean $debug

true if debug is enabled

true if debug is enabled

#
API documentation generated by ApiGen