예제 #1
0
 /**
  * Prepares the upload cover stream for event.
  *
  * @since	1.3
  * @access	public
  */
 public function prepareEventUpdateCoverStream(&$item, $privacy, $includePrivacy = true)
 {
     // Load the photo
     $photo = $this->getPhotoFromParams($item);
     // Load the event
     $event = Foundry::event($item->cluster_id);
     // Get the cover object for the event
     $cover = $event->getCoverData();
     $this->set('cover', $cover);
     $this->set('photo', $photo);
     $this->set('actor', $item->actor);
     $this->set('event', $event);
     $item->title = parent::display('streams/event/upload.cover.title');
     $item->content = parent::display('streams/event/upload.cover.content');
     if ($includePrivacy) {
         $element = $item->context;
         $uid = $item->contextId;
         $item->privacy = $privacy->form($uid, $element, $item->actor->id, 'core.view', false, $item->uid);
     }
 }