Elgg  Version master
Variables
list.php File Reference

Go to the source code of this file.

Variables

 $items = elgg_extract('items', $vars)
 View a list of items. More...
 
if(! $items) if(!is_array($items)||count($items)==0) $position = elgg_extract('position', $vars, 'after')
 
 $pagination_behaviour = elgg_extract('pagination_behaviour', $vars, elgg_get_config('pagination_behaviour'))
 
 $pagination = (bool) elgg_extract('pagination', $vars, true)
 
if(elgg_in_context('widget')) $pagination_before_options = (array) elgg_extract('pagination_before_options', $vars, [])
 
 $pagination_after_options = (array) elgg_extract('pagination_after_options', $vars, [])
 
if(in_array($pagination_behaviour, ['ajax-append', 'ajax-append-auto'])) $list_classes = elgg_extract_class($vars, 'elgg-list', 'list_class')
 
 $list_item_view = elgg_extract('list_item_view', $vars)
 
if(empty($list_item_view)||!elgg_view_exists($list_item_view)) $index = 0
 
 $list_items = ''
 
foreach($items as $item) $result = ''
 
if($pagination &&($position=='before'|| $position=='both')) if(empty($list_items)) else
 
if($pagination &&($position=='after'|| $position=='both')) $limit = elgg_extract('limit', $vars)
 
if(! $pagination && $limit !==false &&!empty($items) &&count($items) >=$limit) $base_url = elgg_extract('base_url', $vars)
 
if(!empty($base_url)) $id = null
 
if($pagination) $container_classes = ['elgg-list-container']
 
 if ( $pagination &&( $pagination_behaviour !=='navigate'))
 

Variable Documentation

◆ $base_url

if (! $pagination &&$limit !==false &&!empty( $items) &&count( $items) >=$limit) $base_url = elgg_extract('base_url', $vars)

Definition at line 114 of file list.php.

◆ $container_classes

if ( $pagination) $container_classes = ['elgg-list-container']

Definition at line 135 of file list.php.

◆ $id

if (!empty( $base_url)) $id = null

Definition at line 121 of file list.php.

◆ $index

if (empty( $list_item_view)||!elgg_view_exists( $list_item_view)) $index = 0

Definition at line 68 of file list.php.

◆ $items

$items = elgg_extract('items', $vars)

View a list of items.

For options to influence the pagination also look at the view 'navigation/pagination'

@uses $vars['items'] Array of ElggEntity, ElggAnnotation or ElggRiverItem objects @uses $vars['pagination'] Show pagination? (default: true) @uses $vars['pagination_behaviour'] Which pagination behaviour to use (default: site preference) @uses $vars['pagination_after_options'] Specific options for the pagination view to be used when the pagination is shown after the item list @uses $vars['pagination_before_options'] Specific options for the pagination view to be used when the pagination is shown before the item list @uses $vars['position'] Position of the pagination: before, after, or both @uses $vars['list_class'] Additional CSS class for the

@uses $vars['item_class'] Additional CSS class for the elements @uses $vars['item_view'] Alternative view to render list items content @uses $vars['list_item_view'] Alternative view to render list items

Definition at line 19 of file list.php.

◆ $limit

if ( $pagination &&( $position=='after'||$position=='both')) $limit = elgg_extract('limit', $vars)

Definition at line 109 of file list.php.

◆ $list_classes

if (in_array( $pagination_behaviour,[ 'ajax-append', 'ajax-append-auto'])) $list_classes = elgg_extract_class($vars, 'elgg-list', 'list_class')

Definition at line 61 of file list.php.

◆ $list_item_view

$list_item_view = elgg_extract('list_item_view', $vars)

Definition at line 63 of file list.php.

◆ $list_items

$list_items = ''

Definition at line 69 of file list.php.

◆ $pagination

$pagination = (bool) elgg_extract('pagination', $vars, true)

Definition at line 33 of file list.php.

◆ $pagination_after_options

$pagination_after_options = (array) elgg_extract('pagination_after_options', $vars, [])

Definition at line 41 of file list.php.

◆ $pagination_before_options

if (elgg_in_context( 'widget')) $pagination_before_options = (array) elgg_extract('pagination_before_options', $vars, [])

Definition at line 39 of file list.php.

◆ $pagination_behaviour

$pagination_behaviour = elgg_extract('pagination_behaviour', $vars, elgg_get_config('pagination_behaviour'))

Definition at line 32 of file list.php.

◆ $position

if (! $items) if (!is_array( $items)||count( $items)==0) $position = elgg_extract('position', $vars, 'after')

Definition at line 31 of file list.php.

◆ $result

foreach ( $items as $item) $result = ''

Definition at line 87 of file list.php.

◆ else

if ( $pagination &&( $position=='before'||$position=='both')) if (empty( $list_items)) else
Initial value:
{
if(in_array($pagination_behaviour, ['ajax-append', 'ajax-append-auto'])) $list_classes
Definition: list.php:61
$list_items
Definition: list.php:69
foreach($items as $item) $result
Definition: list.php:87
elgg_format_element(string $tag_name, array $attributes=[], string $text='', array $options=[])
Format an HTML element.
Definition: output.php:145

Definition at line 98 of file list.php.

◆ if

if($pagination &&($pagination_behaviour !=='navigate')) (   $pagination && $pagination_behaviour !=='navigate')

Definition at line 136 of file list.php.