Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Admin
  • Cache
  • Helper
  • Permission
  • Session
  • Overview
  • Namespace
  • Class
  • Tree

Class Admin

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

Namespace: Xmf\Module
Package: Xmf
Category: Xmf\Module\Admin
Copyright: 2011-2013 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Version: Release: 1.0
Since: 1.0
Link: http://xoops.org
Located at oops_lib/Xmf/Module/Admin.php
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 static string
# menuIconPath( string $image )

Get an appropriate imagePath for menu.php use.

Get an appropriate imagePath for menu.php use.

just to help with other admin things than ModuleAdmin

not part of 2.6 module admin

Parameters

$image
icon name to prepend with path

Returns

string
true if we are in a 2.6 environment
public boolean
# addConfigBoxLine( string $value = '', string $type = 'default' )

Add config line

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

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

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

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

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

Display all item buttons

Parameters

$position
button position (left, right)
$delimiter
delimiter between buttons
public string
# renderInfoBox( )

Render InfoBox

Render InfoBox

Returns

string
HTML rendered info box
public
# displayInfoBox( )

Display InfoBox

Display InfoBox

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

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

Display about page

Parameters

$logo_xoops
display XOOPS logo
public static boolean
# addConfigError( string $value = '' )

Add error to config box

Add error to config box

Parameters

$value
the error message

Returns

boolean
public static boolean
# addConfigAccept( string $value = '' )

Add accept (OK) message to config box

Add accept (OK) message to config box

Parameters

$value
the OK message

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
  • module directory name
$minversion
  • minimum acceptable module version (100 = V1.00)

Returns

boolean
true if requested version of the module is available
API documentation generated by ApiGen