Go to the source code of this file.
|
| $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)) |
|
◆ $cropper_data
$cropper_data = array_merge($default_config, (array) elgg_extract('cropper_config', $vars, [])) |
◆ $default_config
Initial value:= [
'viewMode' => 2,
'background' => false,
'autoCropArea' => 1,
]
Definition at line 27 of file crop.php.
◆ $entity
◆ $entity_coords
◆ $icon_type
◆ $img
if ( $entity instanceof \ElggEntity &&$entity->hasIcon( 'master', $icon_type)) if (isset( $cropper_data[ 'existingAspectRatio'], $cropper_data[ 'aspectRatio'])) $img |
Initial value:
'alt' =>
elgg_echo(
'entity:edit:icon:crop:img:alt'),
])
if($entity instanceof \ElggEntity) if(!isset($cropper_data['aspectRatio'])) $img_url
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
elgg_format_element(string $tag_name, array $attributes=[], string $text='', array $options=[])
Format an HTML element.
Definition at line 110 of file crop.php.
◆ $img_url
if ( $entity instanceof \ElggEntity) if (!isset( $cropper_data[ 'aspectRatio'])) $img_url = null |
◆ $input
◆ $input_name
◆ if
foreach ([ 'x1', 'y1', 'x2', 'y2'] as $coord) if(!empty($img_url)) |
( |
! |
empty $img_url | ) |
|