Methods summary
public
integer|boolean
|
#
add( array|string $data, integer $type = 0 )
Add new album
Parameters
- $data
array|string $data If param is string that it means name
- $type
integer $type If $data is string this param is ignored
Returns
integer|boolean If successful that return id of new album else false
|
public
|
|
public
|
#
getStaticAlbums( boolean $public_only = false, boolean $owned_only = false )
Deprecated
Parameters
- $public_only
boolean $public_only
- $owned_only
boolean $owned_only
|
public
|
|
private
|
#
getChildAlbums( mixed $album_id, mixed $data, mixed & $result, mixed $prefix = '' )
|
public
|
|
public
|
#
getAlbums( mixed $public_only = false, mixed $type = null, mixed $owned_only = false, mixed $count = true )
|
public
|
#
getAlbumsCounters( mixed $public_only = false, mixed $type = null, mixed $owned_only = false, mixed $upload_datetime = null )
|
public
|
|
public
|
|
public
array
|
#
move( integer $album_id, integer $before_id, integer $parent_id )
Move album to place just before $before_id in level with
parent_id=$parent_id
Move album to place just before $before_id in level with
parent_id=$parent_id
Parameters
- $album_id
integer $album_id
- $before_id
integer $before_id
- $parent_id
integer $parent_id
Returns
array album
|
public
|
|
private
|
|
private
|
|
private
|
|
private
|
#
updateDescendants( mixed $parent_id, mixed $data = array(), mixed $include_parent = false )
|
public
|
#
update( integer $id, array $data )
Update taking in account recursive nature of 'full_url' fields
Update taking in account recursive nature of 'full_url' fields
Parameters
- $id
integer $id
- $data
array $data
|
public
array
|
#
getBreadcrumbs( integer $album_id, boolean $escape = false, boolean $use_itself = false )
Get breadcrumbs for album (list of parents)
Get breadcrumbs for album (list of parents)
Parameters
- $album_id
integer $id
- $escape
boolean $escape
- $use_itself
boolean $use_itself
Returns
array of items array('name' => '..', 'full_url' => '..')
|
public
array
|
#
getChildcrumbs( integer $id, boolean $escape = false )
Get "childcrumbs" (sub-albums) for album (list of childrens)
Get "childcrumbs" (sub-albums) for album (list of childrens)
Parameters
- $id
integer $id
- $escape
boolean $escape
Returns
array of items array('name' => '..', 'full_url' => '..')
|
public
|
#
delete( integer $album_id )
Delete album with all relating info (+ taking into account children. Children
'jump' up one level)
Delete album with all relating info (+ taking into account children. Children
'jump' up one level)
Parameters
- $album_id
integer $album_id
|
public
boolean
|
#
deleteByField( string|array $field, integer|float|string|array $value = null )
Deletes records with specified values of specified fields.
Deletes records with specified values of specified fields.
Parameters
- $field
string|array $field Name of one field to be checked or associative array with multiple field
names as item keys and their values as item values.
- $value
integer|float|string|array $value Value or array of values to be checked in specified field. Applicable
only for single field name specified in $field parameter; ignored, if array is
specified in $field.
Returns
boolean Whether deleted successfully
Overrides
|
public
boolean
|
#
urlExists( string $url, integer $album_id = null, integer $parent_id = 0 )
Check if same url exists already for any albums in current level (parent_id),
excepting this album (album_id)
Check if same url exists already for any albums in current level (parent_id),
excepting this album (album_id)
Parameters
- $url
string $url
- $album_id
integer $album_id optional. If set check urls excepting url of this album
- $parent_id
integer $parent_id Check albums of one level
Returns
boolean
|
public
string
|
#
suggestUniqueUrl( string $original_url, integer $album_id = null, integer $parent_id = 0 )
Suggest unique url by original url. If not exists yet just return without
changes, otherwise fit a number suffix and adding it to url.
Suggest unique url by original url. If not exists yet just return without
changes, otherwise fit a number suffix and adding it to url.
Parameters
- $original_url
string $original_url
- $album_id
integer $album_id Delegate to urlExists method
- $parent_id
integer $parent_id Delegate to urlExists method
Returns
string
See
|