Xmf\Module\Admin provides helpful methods for module administration
uses.
Xmf\Module\Admin also provides a method compatible subset of the
Xoops 2.6 ModuleAdmin class for use in transition from 2.5 to 2.6
Methods summary
public static
object
|
#
getInstance( )
Retrieve a module admin instance
Retrieve a module admin instance
If we are on 2.6 this will be the a XoopsModuleAdmin instance.
Older systems with the Frameworks based admin class will get
an instance of this class which provides compatible methods
built from the old Frameworks version.
Always use this to get the ModuleAdmin instance if you use
anything (even the static methods) of this class.
Returns
object a ModuleAdmin instance.
Since
1.0
|
public static
boolean
|
#
is26( )
Are we in a 2.6 environment?
Are we in a 2.6 environment?
just to help with other admin things than ModuleAdmin
not part of 2.6 module admin
Returns
boolean true if we are in a 2.6 environment
|
public
boolean
|
#
addConfigBoxLine( string $value = '', string $type = 'default' )
Add config line
Parameters
- $value
- message to include in config box
- $type
- type of line to add
Returns
boolean
|
public
boolean
|
#
addInfoBox( string $title, string $type = 'default', string $extra = '' )
Add Info box
Parameters
- $title
- info box title
- $type
- for compatibility only
- $extra
- for compatibility only
Returns
boolean
|
public
boolean
|
#
addInfoBoxLine( string $text = '', string $type = 'default', string $color = 'inherit' )
Add line to the info box
Parameters
- $text
- text to add to info box
- $type
- type of infobox line
- $color
- color for infobox line
Returns
boolean
|
public
boolean
|
#
addItemButton( string $title, string $link, string $icon = 'add', string $extra = '' )
Add Item button
Parameters
- $title
- title of button
- $link
- link for button
- $icon
- icon for button
- $extra
- extra
Returns
boolean
|
public
string
|
#
renderButton( string $position = null, string $delimiter = " " )
Render all items buttons
Parameters
- $position
- button position (left, right)
- $delimiter
- delimiter between buttons
Returns
string
|
public
|
#
displayButton( string $position = null, string $delimiter = " " )
Display all item buttons
Parameters
- $position
- button position (left, right)
- $delimiter
- delimiter between buttons
|
public
string
|
#
renderInfoBox( )
Render InfoBox
Returns
string HTML rendered info box
|
public
|
|
public
string
|
#
renderIndex( )
Render index page for admin
Render index page for admin
Returns
string HTML rendered info box
|
public
|
#
displayIndex( )
Display index page for admin
Display index page for admin
|
public
|
#
displayNavigation( string $menu = '' )
Display the navigation menu
Display the navigation menu
Parameters
- $menu
- menu key (script name, i.e. index.php)
|
public
boolean|mixed|string
|
#
renderAbout( boolean $logo_xoops = true )
Render about page
Parameters
- $logo_xoops
- display XOOPS logo
Returns
boolean|mixed|string
|
public static
|
#
setPaypal( string $paypal = '' )
set paypal for 2.5 renderAbout
set paypal for 2.5 renderAbout
Parameters
- $paypal
- PayPal identifier for donate button
|
public
|
#
displayAbout( boolean $logo_xoops = true )
Display about page
Parameters
- $logo_xoops
- display XOOPS logo
|
public static
boolean
|
#
addConfigError( string $value = '' )
Add error to config box
Parameters
Returns
boolean
|
public static
boolean
|
#
addConfigAccept( string $value = '' )
Add accept (OK) message to config box
Add accept (OK) message to config box
Parameters
Returns
boolean
|
public static
string
|
#
iconUrl( string $name = '', string $size = '32' )
Get an appropriate URL for system provided icons.
Get an appropriate URL for system provided icons.
Things which were in Frameworks in 2.5 are in media in 2.6,
making it harder to use and rely on the standard icons.
not part of 2.6, just a transition assist
Parameters
- $name
the image name to provide URL for, or blank
to just get the URL path.
- $size
the icon size (directory). Valid values are
16, 32 or /. A '/' slash will simply set the
path to the icon directory and append $image.
Returns
string true if we are in a 2.6 environment
|
public static
boolean
|
#
checkModuleVersion( string $moddir, integer $minversion )
Check for installed module and version and do addConfigBoxLine()
Check for installed module and version and do addConfigBoxLine()
Parameters
- $moddir
- $minversion
- minimum acceptable module version (100 = V1.00)
Returns
boolean true if requested version of the module is available
|