Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Static Public Member Functions | List of all members
eZModuleHandler Class Reference

## Static Public Member Functions
static | activeTab ()
static | hasTab ()
static | setActiveTab ( $active)
static | useSingleModule ()
static | all ()
static | active ()
static | isOpen ( $module)
static | setOpen ( $module, $open=true)
static | toggle ( $module)
static | setActive ( $modules)
static | append ( $modules, $module)
static | remove ( $modules, $module)
static | moveUp (&$modules, $module, &$moved_module)
static | moveDown (&$modules, $module, &$moved_module)

## Detailed Description

! eZModule The class eZModuleHandler allows for easy handling of modules

Moving modules up and down, enabling/disabling and opening closing can easily be done by using this class. It also allows one to get all available modules as well as all active ones.

All functions are static so one can use them without an object.

// Returning the active modules
$modules =& eZModuleHandler::active();
foreach( $modules as $module )
{
print( "$module is active" );
}
// Opening a module menubox
eZModuleHandler::setOpen( "eZTrade" );
// Moving a module upwards
$has_moved = false;
eZModuleHandler::moveUp( $modules, "eZTrade", $has_moved );
$modules
foreach( $categories as $category) $modules
Definition: bugedit.php:496
eZModuleHandler\active
static active()
Definition: ezmodulehandler.php:139
eZModuleHandler\moveUp
static moveUp(&$modules, $module, &$moved_module)
Definition: ezmodulehandler.php:235
eZModuleHandler\setOpen
static setOpen( $module, $open=true)
Definition: ezmodulehandler.php:181
$module
$module
Definition: classes/admin/linkselect.php:219

Definition at line 58 of file ezmodulehandler.php.

## Member Function Documentation

## ◆ active()

static eZModuleHandler::active | ( |  | ) |
| static

Returns all active modules as an array.

Definition at line 139 of file ezmodulehandler.php.

References $ini, $modules, $preferences, activeTab(), and all().

Referenced by ezpbKernelAdmin\run().

## ◆ activeTab()

static eZModuleHandler::activeTab | ( |  | ) |
| static

Returns true if the module tabbar is active for the current user.

Definition at line 65 of file ezmodulehandler.php.

References $module_tab, $preferences, and hasTab().

Referenced by active().

## ◆ all()

static eZModuleHandler::all | ( |  | ) |
| static

Returns all available modules that you are allowed to see as an array.

Definition at line 121 of file ezmodulehandler.php.

References $ini, $user, eZPermission\checkPermission(), and eZUser\currentUser().

Referenced by active().

## ◆ append()

static eZModuleHandler::append | ( |  | $modules,
|  |  | $module
| ) |  |
| static

Appends the module to the end of the modules list if not already present. The new list is returned.

Definition at line 214 of file ezmodulehandler.php.

References $module, and $modules.

## ◆ hasTab()

static eZModuleHandler::hasTab | ( |  | ) |
| static

Returns true if the module tabbar is activated in the site.ini.

Definition at line 81 of file ezmodulehandler.php.

References $ini, and $module_tab.

Referenced by activeTab().

## ◆ isOpen()

static eZModuleHandler::isOpen | ( |  | $module | ) |
| static

Returns whether the module menubox is open or closed. True is open.

Definition at line 170 of file ezmodulehandler.php.

References $module, and $preferences.

Referenced by toggle().

## ◆ moveDown()

static eZModuleHandler::moveDown | ( | & | $modules,
|  |  | $module,
|  | & | $moved_module
| ) |  |
| static

Tries to move the specified module one item down in the array, if the bottom is reached it is wrapped to the top. The variable moved_module is set to true if a move was done.

Definition at line 274 of file ezmodulehandler.php.

References $i, $module, and $modules.

Referenced by ezpbKernelAdmin\run().

## ◆ moveUp()

static eZModuleHandler::moveUp | ( | & | $modules,
|  |  | $module,
|  | & | $moved_module
| ) |  |
| static

Tries to move the specified module one item up in the array, if the top is reached it is wrapped to the bottom. The variable moved_module is set to true if a move was done.

Definition at line 235 of file ezmodulehandler.php.

References $i, $module, and $modules.

Referenced by ezpbKernelAdmin\run().

## ◆ remove()

static eZModuleHandler::remove | ( |  | $modules,
|  |  | $module
| ) |  |
| static

Removes the module from the modules list. The new list is returned.

Definition at line 224 of file ezmodulehandler.php.

References $module, and $modules.

## ◆ setActive()

static eZModuleHandler::setActive | ( |  | $modules | ) |
| static

Sets the active modules.

Definition at line 203 of file ezmodulehandler.php.

References $modules, and $preferences.

## ◆ setActiveTab()

static eZModuleHandler::setActiveTab | ( |  | $active | ) |
| static

Sets whether the module tabbar is active or not for the current user.

Definition at line 92 of file ezmodulehandler.php.

References $active, and $preferences.

## ◆ setOpen()

static eZModuleHandler::setOpen | ( |  | $module,
|  |  | $open = `true`
| ) |  |
| static

Sets the module menubox to be either open or closed, default is open.

Definition at line 181 of file ezmodulehandler.php.

References $module, and $preferences.

Referenced by toggle().

## ◆ toggle()

static eZModuleHandler::toggle | ( |  | $module | ) |
| static

Toggles the menubox, if it's open it is closed otherwise opened. Returns true if menubox was opened, false otherwise.

See also
  setOpen

Definition at line 193 of file ezmodulehandler.php.

References $module, $preferences, isOpen(), and setOpen().

Referenced by ezpbKernelAdmin\run().

## ◆ useSingleModule()

static eZModuleHandler::useSingleModule | ( |  | ) |
| static

Returns true if only a single module is show at a time.

Definition at line 102 of file ezmodulehandler.php.

References $preferences, and $single_module.

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

- ezmodulehandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.