/** * Prepares the upload avatar stream for a event * * @since 1.3 * @access public */ public function prepareEventUploadAvatarStream(&$item, $privacy, $includePrivacy = true) { $element = $item->context; $uid = $item->contextId; // Load the photo $photo = $this->getPhotoFromParams($item); // Get the data of the group $registry = Foundry::registry($item->params); $event = new SocialEvent(); $event->bind($registry->get($item->cluster_type)); $this->set('event', $event); $this->set('photo', $photo); $this->set('actor', $item->actor); $item->title = parent::display('streams/event/upload.avatar.title'); $item->content = parent::display('streams/event/upload.avatar.content'); if ($includePrivacy) { $item->privacy = $privacy->form($uid, $element, $item->actor->id, 'core.view', false, $item->uid); } }