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