Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

module.php reference: views, parameters and functions

Every key of a module definition - $Module, $ViewList entries (script, functions, params, unordered_params, actions, navigation part, ui context) and $FunctionList with limitations - with the kernel code that reads each…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/creators/app-creators/module-definition-reference.md

On this page

module.php reference: views, parameters and functions

This page is for application creators who write module.php files. It lists the keys the kernel reads and what each does. The reader is lib/ezutils/classes/ezmodule.php (eZModule); kernel modules in kernel/<module>/module.php are the best examples.

Contents

  1. $Module
  2. $ViewList entries
  3. $FunctionList and limitations
  4. A complete example

$Module

$Module = array( 'name' => 'Demo', 'variable_params' => false );
KeyMeaning
namethe module's display name
variable_paramstrue makes each view parameter a variable of its own in the view script, besides $Params

$ViewList entries

KeyMeaning
scriptthe view file in the module directory
functionspolicy functions the user needs (any of them); checked before the script runs
paramsordered parameters from the address: /module/view/<p1>/<p2>
unordered_paramsnamed parameters /(name)/value, mapped to $Params keys: array( 'offset' => 'Offset' )
single_post_actionsPOST button name to action: array( 'StoreButton' => 'Store' )
post_actionsPOST variables whose value is the action name
post_action_parametersper action, POST variables made available as action parameters
default_actionthe action when no button matched
default_navigation_partwhich admin top menu tab is active (ezcontentnavigationpart, ezsetupnavigationpart ...)
ui_contextedit, administration, browse ...: tells designs what kind of page it is
ui_componentthe component name for the same purpose

In the view: $Params['Module']->isCurrentAction( 'Store' ), ->hasActionParameter( 'Title' ), ->actionParameter( 'Title' ).

$FunctionList and limitations

$FunctionList = array();
$FunctionList['read'] = array();
$FunctionList['edit'] = array( 'Section' => $SectionLimitation );

A function with an empty array has no limitations: a role either has it or not. A limitation is described as in kernel/content/module.php:

$SectionLimitation = array(
    'name' => 'Section',
    'values' => array(),
    'class' => 'eZSection',
    'function' => 'fetchList',
    'parameter' => array( false ) );

values lists fixed choices (array( array( 'Name' => 'Self', 'value' => '1' ) )); class, function and parameter name a static method that returns the choices for the role editor. Your code must apply the limitation itself (Policy functions and limitations).

Functions appear in Users > Roles > New policy once the module is registered and the caches are cleared.

A complete example

<?php
$Module = array( 'name' => 'Demo' );

$ViewList = array();
$ViewList['list'] = array(
    'script' => 'list.php',
    'functions' => array( 'read' ),
    'default_navigation_part' => 'ezcontentnavigationpart',
    'params' => array(),
    'unordered_params' => array( 'offset' => 'Offset' ) );
$ViewList['edit'] = array(
    'script' => 'edit.php',
    'functions' => array( 'edit' ),
    'ui_context' => 'edit',
    'params' => array( 'ItemID' ),
    'single_post_actions' => array( 'StoreButton' => 'Store', 'CancelButton' => 'Cancel' ),
    'post_action_parameters' => array( 'Store' => array( 'Title' => 'ItemTitle' ) ) );

$FunctionList = array();
$FunctionList['read'] = array();
$FunctionList['edit'] = array();

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x