class CommunityModelPhotos extends JCCModel implements CLimitsInterface


Located at : UKNOWVA_ROOT/components/com_community/models/photos.php

Properties

$_pagination
$total
$test

Methods

__construct(array $config = array())

Constructor

from JModel
string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get($id, $type = 'photos')

Returns a property of the object or the default value if the property is not set.

array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static array
addIncludePath(mixed $path = '', string $prefix = '')

Add a directory where JModel should search for models. You may either pass a string or an array of directories.

from JModel
static void
addTablePath(mixed $path)

Adds to the stack of model table paths in LIFO order.

from JModel
static mixed
getInstance(string $type, string $prefix = '', array $config = array())

Returns a Model object, always creating it

from JModel
getDbo()

Method to get the database connector object

from JModel
string
getName()

Method to get the model name

from JModel
object
getState(string $property = null, mixed $default = null)

Method to get model state variables

from JModel
getTable(string $name = '', string $prefix = 'Table', array $options = array())

Method to get a table object, load it if necessary.

from JModel
void
setDbo(object $db)

Method to set the database connector object

from JModel
mixed
setState(string $property, mixed $value = null)

Method to set model state variables

from JModel
JCCModel()

No description

from JCCModel
getNotes()

No description

from JCCModel
getSample()

No description

from JCCModel
store()

No description

from JCCModel
CommunityModelPhotos()

No description

int
getTotalSitePhotos()

Retrieves total number of photos from the site.

cleanUpTokens()

No description

getUserUploadToken($userId)

No description

addUserUploadSession($token)

No description

update($data, $type = 'photo')

No description

updatePermission($userid, $permission)

No description

updatePermissionByGroup($groupid, $permission)

No description

updatePermissionByAlbum($albumid, $permissions)

No description

_createPhoto($data)

No description

_createAlbum($data)

No description

_updateAlbum($data)

No description

_updatePhoto($data)

No description

removePhoto($id, $type = PHOTOS_USER_TYPE)

Removes a photo from the database and the file.

getPagination()

No description

getAllPhotos($albumId = null, $photoType = PHOTOS_USER_TYPE, $limit = null, $permission = null, $orderType = 'DESC', $primaryOrdering = 'ordering')

Return a list of photos from specific album

getPhotos($id, $limit = null, $limitstart = null, $includeUnpublished = false)

Return a list of photos from specific album

getAlbum(integer $albumId)

No description

type
getDefaultAlbum(type $typeId, type $type = PHOTOS_USER_TYPE)

Return the

getTotalPhotos($albumId)

Return total photos in a given album id.

getAllAlbums($userId, $limit, $tags = array())

No description

checkAlbumsPermissions($row, $myId)

No description

getSiteAlbums($type = PHOTOS_USER_TYPE)

Get site wide albums

getAlbumCount($where = '')

No description

getAlbumPhotoCount($where = '', $limit = NULL, $limitstart = NULL)

No description

getGroupAlbums($groupId = '', $pagination = false, $doubleLimit = false, $limit = '', $isAdmin = false, $creator = '')

No description

getAlbums($userId = '', $pagination = false, $doubleLimit = false)

Get the albums for specific user or site wide

_getAlbums($id, $type, $pagination = false, $doubleLimit = false, $limit = '', $creator = '')

No description

_getOnlyAlbums($id, $type, $limitstart = '', $limit = '')

No description

isCreator($photoId, $userId)

No description

getPhoto($id)

Return CPhoto object

getPhotosCount($id, $photoType = PHOTOS_USER_TYPE)

Get the count of the photos from specific user or groups.

getDefaultImage($albumId)

No description

setDefaultImage(type $albumId, type $photoId)

Set the $photoId as the album cover of the album

setOrdering($photos, $albumId)

No description

type
isGroupPhoto(type $photoId)

Return true if the given id is a group photo

getPhotoGroupId($photoId)

No description

getPopularPhotos($limit = 20, $permission = null)

Retrieve popular photos from the site.

getInviteListByName($namePrefix, $userid, $cid, $limitstart, $limit = 8)

No description

getTotalToday($userId)

Return total photos for the day for the specific user.

getPhotoList($data)

No description

Details

in JModel at line 202
JObject __construct(array $config = array())

Constructor

Parameters

array $config An array of configuration options (name, state, dbo, tablepath, ignorerequest).

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

at line 274
mixed get($id, $type = 'photos')

Returns a property of the object or the default value if the property is not set.

Parameters

$id
$type

Return Value

mixed The value of the property.

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JModel at line 84
static array addIncludePath(mixed $path = '', string $prefix = '')

Add a directory where JModel should search for models. You may either pass a string or an array of directories.

Parameters

mixed $path A path or array[sting] of paths to search.
string $prefix A prefix for models.

Return Value

array An array with directory elements. If prefix is equal to '', all directories are returned.

in JModel at line 123
static void addTablePath(mixed $path)

Adds to the stack of model table paths in LIFO order.

Parameters

mixed $path The directory as a string or directories as an array to add.

Return Value

void

in JModel at line 161
static mixed getInstance(string $type, string $prefix = '', array $config = array())

Returns a Model object, always creating it

Parameters

string $type The model type to instantiate
string $prefix Prefix for the model class name. Optional.
array $config Configuration array for model. Optional.

Return Value

mixed A model object or false on failure

in JModel at line 327
JDatabase getDbo()

Method to get the database connector object

Return Value

JDatabase JDatabase connector object

in JModel at line 341
string getName()

Method to get the model name

The model name. By default parsed using the classname or it can be set by passing a $config['name'] in the class constructor

Return Value

string The name of the model

in JModel at line 365
object getState(string $property = null, mixed $default = null)

Method to get model state variables

Parameters

string $property Optional parameter name
mixed $default Optional default value

Return Value

object The property where specified, the state object where omitted

in JModel at line 388
JTable getTable(string $name = '', string $prefix = 'Table', array $options = array())

Method to get a table object, load it if necessary.

Parameters

string $name The table name. Optional.
string $prefix The class prefix. Optional.
array $options Configuration array for model. Optional.

Return Value

JTable A JTable object

in JModel at line 427
void setDbo(object $db)

Method to set the database connector object

Parameters

object $db &$db A JDatabase based object

Return Value

void

in JModel at line 441
mixed setState(string $property, mixed $value = null)

Method to set model state variables

Parameters

string $property The name of the property.
mixed $value The value of the property to set or null.

Return Value

mixed The previous value of the property or null if not set.

in JCCModel at line 13
JCCModel()

in JCCModel at line 18
getNotes()

in JCCModel at line 22
getSample()

in JCCModel at line 28
store()

at line 25
CommunityModelPhotos()

at line 52
int getTotalSitePhotos()

Retrieves total number of photos from the site.

Return Value

int $total Total number of photos.

at line 70
cleanUpTokens()

at line 82
getUserUploadToken($userId)

Parameters

$userId

at line 96
addUserUploadSession($token)

Parameters

$token

at line 105
update($data, $type = 'photo')

Parameters

$data
$type

at line 124
updatePermission($userid, $permission)

Parameters

$userid
$permission

at line 156
updatePermissionByGroup($groupid, $permission)

Parameters

$groupid
$permission

at line 204
updatePermissionByAlbum($albumid, $permissions)

Parameters

$albumid
$permissions

at line 219
_createPhoto($data)

Parameters

$data

at line 237
_createAlbum($data)

Parameters

$data

at line 252
_updateAlbum($data)

Parameters

$data

at line 256
_updatePhoto($data)

Parameters

$data

at line 267
removePhoto($id, $type = PHOTOS_USER_TYPE)

Removes a photo from the database and the file.

Parameters

$id
$type

at line 280
getPagination()

at line 290
getAllPhotos($albumId = null, $photoType = PHOTOS_USER_TYPE, $limit = null, $permission = null, $orderType = 'DESC', $primaryOrdering = 'ordering')

Return a list of photos from specific album

Parameters

$albumId
$photoType
$limit
$permission
$orderType
$primaryOrdering

at line 349
getPhotos($id, $limit = null, $limitstart = null, $includeUnpublished = false)

Return a list of photos from specific album

Parameters

$id
$limit
$limitstart
$includeUnpublished

at line 405
getAlbum(integer $albumId)

Parameters

integer $albumId albumid Unique if of the album

at line 419
type getDefaultAlbum(type $typeId, type $type = PHOTOS_USER_TYPE)

Return the

Parameters

type $typeId is userid for user type and group id for group type
type $type

Return Value

type

at line 457
getTotalPhotos($albumId)

Return total photos in a given album id.

Parameters

$albumId

at line 475
getAllAlbums($userId, $limit, $tags = array())

Parameters

$userId
$limit
$tags

at line 562
checkAlbumsPermissions($row, $myId)

Parameters

$row
$myId

at line 592
getSiteAlbums($type = PHOTOS_USER_TYPE)

Get site wide albums

Parameters

$type

at line 641
getAlbumCount($where = '')

Parameters

$where

at line 659
getAlbumPhotoCount($where = '', $limit = NULL, $limitstart = NULL)

Parameters

$where
$limit
$limitstart

at line 693
getGroupAlbums($groupId = '', $pagination = false, $doubleLimit = false, $limit = '', $isAdmin = false, $creator = '')

Parameters

$groupId
$pagination
$doubleLimit
$limit
$isAdmin
$creator

at line 708
getAlbums($userId = '', $pagination = false, $doubleLimit = false)

Get the albums for specific user or site wide

Parameters

$userId
$pagination
$doubleLimit

at line 713
_getAlbums($id, $type, $pagination = false, $doubleLimit = false, $limit = '', $creator = '')

Parameters

$id
$type
$pagination
$doubleLimit
$limit
$creator

at line 789
_getOnlyAlbums($id, $type, $limitstart = '', $limit = '')

Parameters

$id
$type
$limitstart
$limit

at line 836
isCreator($photoId, $userId)

Parameters

$photoId
$userId

at line 857
getPhoto($id)

Return CPhoto object

Parameters

$id

at line 869
getPhotosCount($id, $photoType = PHOTOS_USER_TYPE)

Get the count of the photos from specific user or groups.

Parameters

$id
$photoType

at line 896
getDefaultImage($albumId)

Parameters

$albumId

at line 919
CommunityModelPhotos setDefaultImage(type $albumId, type $photoId)

Set the $photoId as the album cover of the album

Parameters

type $albumId
type $photoId

Return Value

CommunityModelPhotos

at line 932
setOrdering($photos, $albumId)

Parameters

$photos
$albumId

at line 960
type isGroupPhoto(type $photoId)

Return true if the given id is a group photo

Parameters

type $photoId

Return Value

type

at line 975
getPhotoGroupId($photoId)

Parameters

$photoId

at line 997
getPopularPhotos($limit = 20, $permission = null)

Retrieve popular photos from the site.

Parameters

$limit
$permission

at line 1027
getInviteListByName($namePrefix, $userid, $cid, $limitstart, $limit = 8)

Parameters

$namePrefix
$userid
$cid
$limitstart
$limit

at line 1102
getTotalToday($userId)

Return total photos for the day for the specific user.

Parameters

$userId

at line 1127
getPhotoList($data)

Parameters

$data