Elgg  Version 6.0
Variables
crop.php File Reference

Go to the source code of this file.

Variables

 $entity = elgg_extract('entity', $vars)
 
 $icon_type = elgg_extract('icon_type', $vars, 'icon')
 
 $input_name = elgg_extract('name', $vars, 'icon')
 
 $default_config
 
 $cropper_data = array_merge($default_config, (array) elgg_extract('cropper_config', $vars, []))
 
 $entity_coords = []
 
if($entity instanceof\ElggEntity) if(!isset($cropper_data['aspectRatio'])) $img_url = null
 
if($entity instanceof\ElggEntity &&$entity->hasIcon('master', $icon_type)) if(isset($cropper_data['existingAspectRatio'], $cropper_data['aspectRatio'])) $img
 
 $input = ''
 
foreach(['x1', 'y1', 'x2', 'y2'] as $coord) if (!empty($img_url))
 

Variable Documentation

$cropper_data = array_merge($default_config, (array) elgg_extract('cropper_config', $vars, []))

Definition at line 33 of file crop.php.

$default_config
Initial value:
= [
'viewMode' => 2

Definition at line 27 of file crop.php.

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

Definition at line 22 of file crop.php.

$entity_coords = []

Definition at line 36 of file crop.php.

$icon_type = elgg_extract('icon_type', $vars, 'icon')

Definition at line 23 of file crop.php.

if ($entity instanceof\ElggEntity &&$entity->hasIcon('master', $icon_type)) if (isset($cropper_data['existingAspectRatio'], $cropper_data['aspectRatio'])) $img
Initial value:
'data-icon-cropper' => json_encode($cropper_data),
'src' => $img_url,
'alt' => elgg_echo('entity:edit:icon:crop:img:alt'),
])
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
if($entity instanceof\ElggEntity) if(!isset($cropper_data['aspectRatio'])) $img_url
Definition: crop.php:96
$cropper_data
Definition: crop.php:33
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145

Definition at line 110 of file crop.php.

if ($entity instanceof\ElggEntity) if (!isset($cropper_data['aspectRatio'])) $img_url = null

Definition at line 96 of file crop.php.

$input = ''

Definition at line 118 of file crop.php.

$input_name = elgg_extract('name', $vars, 'icon')

Definition at line 24 of file crop.php.

foreach (['x1', 'y1', 'x2', 'y2'] as $coord) if(!empty($img_url))

Definition at line 127 of file crop.php.