Elgg  Version 4.3
SetUserIconFileHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Icons;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20  $icon = $hook->getValue();
21 
22  $entity = $hook->getEntityParam();
23  $size = $hook->getParam('size', 'medium');
24 
25  $icon->owner_guid = $entity->guid;
26  $icon->setFilename("profile/{$entity->guid}{$size}.jpg");
27 
28  return $icon;
29  }
30 }
__invoke(\Elgg\Hook $hook)
Set user icon file.
Models an event passed to hook handlers.
Definition: Hook.php:11
if(function_exists('apache_get_version')) $icon
Definition: generic.php:49
$entity
Definition: reset.php:8
$size
Definition: thumb.php:23