Overview

Namespaces

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

Classes

  • Admin
  • Helper
  • Overview
  • Namespace
  • Class
  • Tree

Class Admin

Xmf\Module\Admin provides helpful methods for module administration uses.

Xmf\Module\Admin provides a method compatible subset of the Xoops\Module\Admin class (introduced in 2.6) and other convenience methods useful in transition

Namespace: Xmf\Module
Package: Xmf
Category: Xmf\Module\Admin
Copyright: 2011-2016 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
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Module/Admin.php
Methods summary
protected
# __construct( )

Constructor

Constructor

public static object
# getInstance( )

Retrieve a module admin instance

Retrieve a module admin instance

If we are on a next generation system this will be the a native Xoops\Module\Admin 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.

Returns

object
a ModuleAdmin or Xoops\Module\Admin instance.
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 minimal set of acceptable types and value expectation 'default' - value is message displayed directly (also used for unknown types) 'folder' - value is directory name, will display accept if exists, error if not 'chmod' - value is array(directory, permission) accept if exists with permission, else error 'module' - value is string module name, or array(module name, errortype) If module is active, an accept line displays, otherwise, a warning (if value is array(module, "warning") or an error displays.

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
# displayAbout( boolean $logo_xoops = true )

Display about page

Display about page

Parameters

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

Add error to config box

Add error to config box

Parameters

$value
the error message

Returns

boolean
public 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 boolean
# addConfigWarning( string $value = '' )

Add warning to config box

Add warning to config box

Parameters

$value
the warning message

Returns

boolean
public boolean
# addConfigModuleVersion( 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
protected static boolean
# isXng( )

Are we in a next generation environment?

Are we in a next generation environment?

not part of next generation Xoops\Module\Admin

Returns

boolean
true if we are in a post XOOPS 2.5.x 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 next generation Xoops\Module\Admin

Parameters

$image
icon name to prepend with path

Returns

string
the icon path
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 later versions, making it harder to use and rely on the standard icons.

not part of next generation Xoops\Module\Admin

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
path to icons
public static
# setPaypal( string $paypal = '' )

set paypal for 2.5.x renderAbout

set paypal for 2.5.x renderAbout

not part of next generation Xoops\Module\Admin

Parameters

$paypal
PayPal identifier for donate button
Properties summary
protected static object $ModuleAdmin

The real ModuleAdmin object

The real ModuleAdmin object

# null
protected $lastInfoBoxTitle
# null
protected static string $paypal
# ''
API documentation generated by ApiGen