Elgg  Version master
Variables
chip.php File Reference

Go to the source code of this file.

Variables

 $entity = elgg_extract('entity', $vars)
 Object chip Renders a simple image block with an icon and title. More...
 
if(! $entity instanceof ElggEntity$title = elgg_extract('title', $vars, '')
 
if($title==='') $icon = elgg_extract('icon', $vars)
 
if(!isset($icon)) $params = (array) elgg_extract('image_block_vars', $vars, [])
 
 $class = elgg_extract_class($params, 'elgg-chip')
 
 $params ['class'] = $class
 
 $params ['data-guid'] = $entity->guid
 

Variable Documentation

◆ $class

$class = elgg_extract_class($params, 'elgg-chip')

Definition at line 29 of file chip.php.

◆ $entity

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

Object chip Renders a simple image block with an icon and title.

@uses $vars['entity'] ElggEntity @uses $vars['title'] Title link (optional) false = no title, '' = default @uses $vars['icon'] Object icon. If set, the listing will be wrapped with an image block @uses $vars['class'] Class selector for the image block @uses $vars['image_block_vars'] Attributes for the image block wrapper

Definition at line 13 of file chip.php.

◆ $icon

if ( $title==='') $icon = elgg_extract('icon', $vars)

Definition at line 23 of file chip.php.

◆ $params [1/3]

if (!isset( $icon)) $params = (array) elgg_extract('image_block_vars', $vars, [])

Definition at line 28 of file chip.php.

◆ $params [2/3]

$params[ 'class'] = $class

Definition at line 31 of file chip.php.

◆ $params [3/3]

$params[ 'data-guid'] = $entity->guid

Definition at line 32 of file chip.php.

◆ $title

if (! $entity instanceof ElggEntity) $title = elgg_extract('title', $vars, '')

Definition at line 18 of file chip.php.