Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

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

## Static Public Member Functions
static | drawList ( $params, $no_print=false)
static | drawNavigator (&$t, $total_types, $max_types, $index, $parent=false, $variables=false)

## Detailed Description

! eZCommon The class eZList helps in handling listings of various types

To create a naviator bare at the bottom of your list you can do:

$t = new eZTemplate( ... );
$ItemCount = Items::totalCount();
$Max = 10;
$Index = 0;
eZList::drawNavigator( $t, $ItemCount, $Max, $Index, "my_template" );
$ItemCount
$ItemCount
Definition: browserlist.php:53
eZList\drawNavigator
static drawNavigator(&$t, $total_types, $max_types, $index, $parent=false, $variables=false)
Definition: ezlist.php:401
eZTemplate
Definition: eztemplate.php:107
$t
foreach( $Modules as $module) if(isset( $ItemInsert)) $t
Definition: classes/admin/linklist.php:168
$Max
$Max
Definition: countrylist.php:31
$Index
$Index
Definition: eZPBINIFile.php:499

TODO Document drawList() properly.

Definition at line 51 of file ezlist.php.

## Member Function Documentation

## ◆ drawList()

static eZList::drawList | ( |  | $params,
|  |  | $no_print = `false`
| ) |  |
| static

This code can be reused for simple type lists. It requires an object with the following functions: name(): Used for reading the name of the type. id(): Used for retrieving the id of the type in the database

The object list must be initialized in the $item_type_array variable. Also these following variables must be set properly. $language_file: The file used for reading language translations, for example: consultationtype.php $page_path: The base name of the url, for example: /address/consultationtype You can also enable item placement by setting the $move_item variable to true, to make sure an item can be moved it must implement the moveUp() and moveDown() functions. If the $SortPage variable is set all items will have hyperlinked names linked to the variable content. If $Searchable is set to true a search button is added. If $template_array, $variable_array and $block_array is set they are used for extending the list with extra information.

Definition at line 70 of file ezlist.php.

References $Action, $block_array, $count, $func_call, $header, $i, $ini, $item, $item_error, $item_type_array, $Language, $language_file, $ListType, $Max, $module, $move_item, $Offset, $page_path, $search_encoded, $Searchable, $SearchText, $t, $template_array, $total_types, $typelist, $variable_array, drawNavigator(), and eZTextTool\htmlspecialchars().

## ◆ drawNavigator()

static eZList::drawNavigator | ( | & | $t,
|  |  | $total_types,
|  |  | $max_types,
|  |  | $index,
|  |  | $parent = `false`,
|  |  | $variables = `false`
| ) |  |
| static

Draws next/prev navigators by using a specified template. $total_types is the total number of types a list will give. $max_types is the number of types the list should show at a time. $index is the index of the type list. if $parent is set to a string that string is used as the parent for the template blocks, if false all blocks needs to be set by the client. $variables is an associative array with various template variables, if a template variable is not specified in the array the default is used. It currently supports: next: The block containing the next button next_inactive: The block containing the inactive next button next_index: The index variable for the next button previous: The block containing the previous button previous_inactive: The block containing the inactive previous button previous_index: The index variable for the previous button item: The block containing the hotlink items item_inactive: The block containing the inactive hotlink items item_index: The item index variable used with hotlinks item_list: The block containing the active and inactive hotlink items item_name: The item name variable used with hotlinks type_list: The block containing the whole navigator HTML

Definition at line 401 of file ezlist.php.

References $i, $index, $item, $page, $t, $total, and $total_types.

Referenced by drawList().

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

- ezlist.php

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