Overview

Packages

  • akismet
  • None
  • PHP
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • plugins
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Signatures
    • Signed
    • Transport
  • wa-apps
    • blog
      • actions
        • backend
        • blog
        • comment
        • cron
        • design
        • frontend
        • page
        • plugin
        • post
      • api
        • v1
      • cli
      • layout
      • model
      • plugin
        • aksimet
        • category
        • emailsubscription
        • favorite
        • gravatar
        • import
        • markdown
        • myposts
        • tag
        • troll
      • settings
    • checklists
      • backend
      • json
    • contacts
      • backend
    • developer
    • dummy
    • guestbook
    • guestbook2
    • photos
      • album
      • api
        • v1
      • backend
      • design
      • dialog
      • frontend
      • page
      • photo
      • plugin
        • comment
        • imageeffects
        • import
        • publicgallery
        • watermark
      • search
      • settings
      • stack
      • tag
      • upload
    • site
      • backend
      • blocks
      • config
      • design
      • domains
      • files
      • frontend
      • helper
      • layout
      • pages
      • routing
      • setting
    • stickies
      • api
        • v1
      • sheet
      • stiky
  • wa-plugin
    • payment
    • shipping
    • sms
  • wa-plugins
    • shipping
      • usps
  • wa-system
    • API
    • Auth
      • Adapters
    • Autoload
    • Cache
      • Adapter
    • Captcha
    • Config
    • Contact
    • controller
    • currency
    • database
    • datetime
    • design
    • event
    • exception
    • files
    • image
    • layout
    • locale
    • log
    • mail
    • page
      • action
      • model
    • payment
    • plugin
    • request
    • response
    • routing
    • shipping
    • sms
    • storage
    • user
    • util
    • validator
    • view
    • webasyst
      • api
      • backend
      • cli
      • config
      • layout
      • login
      • model
      • password
      • payment
      • profile
      • settings
      • shipment
    • widget
    • workflow
  • waPlugins
    • Payment
  • webasyst
    • wa-system
      • helper

Classes

  • photosAlbumCountModel
  • photosAlbumModel
  • photosAlbumParamsModel
  • photosAlbumPhotosModel
  • photosAlbumRightsModel
  • photosCollection
  • photosConfig
  • photosContactsDeleteHandler
  • photosContactsLinksHandler
  • photosDefaultFrontendLayout
  • photosDefaultLayout
  • photosDialogConfirmViewAction
  • photosExif
  • photosForgotpasswordAction
  • photosFrontController
  • photosFrontendAlbum
  • photosFrontendCollectionViewAction
  • photosFrontendPhoto
  • photosFrontendViewAction
  • photosImage
  • photosLoginAction
  • photosMobileLayout
  • photosOAuthController
  • photosPageModel
  • photosPageParamsModel
  • photosPhoto
  • photosPhotoExifModel
  • photosPhotoHtmlRenderer
  • photosPhotoModel
  • photosPhotoRenderHelper
  • photosPhotoRightsModel
  • photosPhotoTagsModel
  • photosPlugin
  • photosRightConfig
  • photosSignupAction
  • photosSitemapConfig
  • photosTagModel
  • photosViewHelper
  • photosViewTree
  • photosViewTreeElement
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class photosAlbumModel

waModel
Extended by photosAlbumModel
Package: wa-apps\photos
Located at wa-apps/photos/lib/models/photosAlbum.model.php
Methods summary
public integer|boolean
# add( array|string $data, integer $type = 0 )

Add new album

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
# getByName( mixed $name )
public
# getStaticAlbums( boolean $public_only = false, boolean $owned_only = false )

Deprecated

Parameters

$public_only
boolean
$public_only
$owned_only
boolean
$owned_only
public
# getFirstChild( mixed $album_id )
private
# getChildAlbums( mixed $album_id, mixed $data, mixed & $result, mixed $prefix = '' )
public
# getDescendant( mixed $album_id )
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
# updateName( mixed $id, mixed $name )
public
# updateCount( mixed $id, mixed $count )
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
# getByType( mixed $type )
private
# updateUrl( mixed $id, mixed $url )
private
# correctFullUrlOfDescendants( mixed $id, mixed $full_url )
private
# privateDescendants( mixed $parent_id )
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

waModel::deleteByField()
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

photosAlbumModel::urlExists()
Methods inherited from waModel
__construct(), addCacheCleaner(), autocommit(), castValue(), commit(), countAll(), countByField(), createSchema(), database(), deleteById(), describe(), escape(), escapeField(), exec(), fieldExists(), getAll(), getByField(), getById(), getEmptyRow(), getFieldValue(), getMetadata(), getQueryConstructor(), getTableId(), getTableName(), getWhereByField(), insert(), isAutoIncrement(), multiInsert(), multipleInsert(), order(), ping(), prepare(), query(), replace(), rollback(), select(), setCache(), updateByField(), updateById(), where()
Constants summary
integer TYPE_STATIC 0
#
integer TYPE_DYNAMIC 1
#
Properties summary
protected string $table 'photos_album'
#

Name of the table

Name of the table

Properties inherited from waModel
$adapter, $fields, $id, $type, $writable
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0