/** * Binds posted data into existing album object * */ public function bindAlbum(CTableAlbum $album, $postData) { $album->bind($postData); $album->groupid = $this->groupid; // Group photo should always follow the group permission. $group = JTable::getInstance('Group', 'CTable'); $group->load($album->groupid); $album->permissions = $group->approvals ? PRIVACY_GROUP_PRIVATE_ITEM : 0; return $album; }
/** * Decorates the album item as a folder for JomSocial * * @since 5.0 * @access public * @param string * @return */ public function decorateFolder(CTableAlbum $album) { $obj = new stdClass(); $obj->place = 'jomsocial'; $obj->title = $album->name; $obj->url = rtrim(JURI::root(), '/') . '/' . str_ireplace(JPATH_ROOT, '', $album->path); $obj->key = EBMM::getKey('jomsocial:' . $album->id); $obj->type = 'folder'; $obj->icon = EBMM::getIcon('image'); $obj->modified = $album->created; $obj->size = 0; $obj->thumbnail = $album->getCoverThumbURI(); $obj->preview = $album->getCoverThumbURI(); return $obj; }
/** * Binds posted data into existing album object **/ public function bindAlbum(CTableAlbum &$album, $postData) { $album->bind($postData); $album->groupid = $this->groupid; return $album; }
/** * Binds posted data into existing album object * */ public function bindAlbum(CTableAlbum $album, $postData) { $album->bind($postData); $album->eventid = $this->eventid; // Event photo should always follow the event permission. $event = JTable::getInstance('Event', 'CTable'); $event->load($album->eventid); $album->permissions = 0; return $album; }