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 photosCollection

Package: wa-apps\photos
Located at wa-apps/photos/lib/classes/photosCollection.class.php
Methods summary
public
# __construct( string|array $hash = '', array $options = array() )

Constructor for collections of photos

Constructor for collections of photos

Parameters

$hash
string|array
$hash
$options
array
$options
protected
# setHash( mixed $hash )
public
# getSQL( )
protected
# getFields( mixed $fields )
protected string
# getExpression( string $op, string $value )

Returns expression for SQL

Returns expression for SQL

Parameters

$op
string
$op - operand ==, >=, etc
$value
string
$value - value

Returns

string
protected
# prepare( mixed $add = false, mixed $auto_title = true )
protected
# addRightsCondition( waUser $user )
protected
# idPrepare( mixed $ids )
protected
# albumPrepare( integer $id, boolean $auto_title = true )

Parameters

$id
integer
$id - ID of the album
$auto_title
boolean
$auto_title
protected
# tagPrepare( mixed $id, mixed $auto_title = true )
protected
# tagPrepareIntersection( mixed $tag_names )
protected
# authorPrepare( mixed $contact_id )
protected
# favoritesPrepare( )
public static
# escapePhotoFields( mixed & $photos )
public static
# parseConditions( mixed $query )
public static string
# frontendAlbumUrlToHash( string $album_url, array & $album = null )

Translate frontend album url to hash looks like 'album/<album_id>[:<hash>]'. Take into account private hash

Translate frontend album url to hash looks like 'album/<album_id>[:<hash>]'. Take into account private hash

Parameters

$album_url
string
$album_url full url or string looks like album:<hash>
$album
array
&$album If $album_url is path to real album than album will be retrieved to this parameter

Returns

string
$hash Hash of collection
public static
# frontendAlbumHashToUrl( mixed $hash )
public static string
# getFrontendLink( string $hash = '', boolean $check_album = true )

Parameters

$hash
string
$hash
$check_album
boolean
$check_album

Returns

string
private
# setAlbum( mixed $album )
public
# getAlbum( )
protected
# searchPrepare( mixed $query, mixed $auto_title = true )
public array
# getPhotos( string|array $fields = "*,thumb,tags", integer $offset = 0, integer $limit = 50, boolean $escape = true )

Returns photos in this collection.

Returns photos in this collection.

Parameters

$fields
string|array
$fields
$offset
integer
$offset
$limit
integer
$limit
$escape
boolean
$escape

Returns

array
[photo_id][field] = field value in appropriate field format

Throws

waException
public static
# extendPhotos( mixed $photos )
public
# count( )
public
# getPhotoOffset( mixed $photo )
private
# getPhotoOffsetCondition( mixed $photo, mixed $order, mixed $eq = false )
protected string
# getOrderBy( )

Returns ORDER BY clause

Returns ORDER BY clause

Returns

string
public string
# orderBy( string $field, string $order = 'ASC' )

Set order by clause for select

Set order by clause for select

Parameters

$field
string
$field
$order
string
$order

Returns

string
protected photosPhotoModel|photosTagModel|photosPhotoTagsModel
# getModel( string $type = 'photo' )

Returns photos model

Returns photos model

Parameters

$type
string
$type

Returns

photosPhotoModel|photosTagModel|photosPhotoTagsModel
public
# getTitle( )
public
# addWhere( mixed $condition )

Add WHERE condition. Primarily for plugins that extend this collection.

Add WHERE condition. Primarily for plugins that extend this collection.

public
# addTitle( mixed $title, mixed $delim = ', ' )
public
# setTitle( mixed $title )
public
# setCheckRights( mixed $check_rights )
Properties summary
protected mixed $hash
#
protected boolean $check_rights true
#
protected mixed $frontend_base_url
#
protected mixed $frontend_rights_user
#
protected mixed $where
#
protected string $order_by 'p.upload_datetime DESC,p.id'
#
protected mixed $joins
#
protected array $options array( //'check_rights' => false )
#
protected boolean $prepared false
#
protected string $title ''
#
protected mixed $count
#
protected array $post_fields array()
#
protected array $models array()
#
protected mixed $album
#
protected array $update_count array()
#
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0