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

  • blogBlogModel
  • blogCommentModel
  • blogItemModel
  • blogPageModel
  • blogPageParamsModel
  • blogPostModel
  • blogPostParamsModel
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class blogPostModel

waModel
Extended by blogItemModel
Extended by blogPostModel
Package: wa-apps\blog\model
Located at wa-apps/blog/lib/models/blogPost.model.php
Methods summary
public array
# getTimeline( array $blogs = array(), array $blog_data = array(), array $datetime = array() )

Parameters

$blogs
array
$blogs
$blog_data
array
$blog_data
$datetime
array
$datetime

Returns

array
public
# getBlogPost( mixed $id, mixed $blog_id = null )
protected
# setFields( mixed $fields = array(), mixed $add_table = true )

Overrides

blogItemModel::setFields()
public blogPostModel
# search( array $options = array(), array $extend_options = array(), array $extend_data = array() )

Generic search post entries method

Generic search post entries method

$options

  • sort:
  • year: int|int[] 2011|array(2009,2011)|array(2007,2008,...) ate option if single exact match, interval if array of two items, one of items in array more then two items
  • month:int|int[]
  • day: int|int[]
  • datetime:
  • status: Status has default self::STATUS_PUBLISHED if not specified, all statuses if false or specified in array<
  • contact_id: If specified records will be checked authorship in non self::STATUS_PUBLISHED status
  • blog_id:
  • text:

Parameters

$options
array
@options
$extend_options
array
$extend_options see prepareView method
$extend_data
array
$extend_data

Returns

blogPostModel

See

blogItemModel::search()

Overrides

blogItemModel::search()
public mixed
# prepareView( mixed $items, array $extend_options = array(), array $extend_data = array() )

Supplement the items data

Supplement the items data

$extend_options - link: if it false - not add author posts - plugin: if false suppress plugin provided data - datetime: - test:

Parameters

$items
mixed
$items
$extend_options
array
@extend_options
$extend_data
array
$extend_data

Returns

mixed
public array
# getBySlug( string $slug )

Get post entry by it slug

Get post entry by it slug

Parameters

$slug
string
$slug

Returns

array
public integer
# updateItem( integer $id, array $data = array(), array $current_data = array() )

Update blog post item

Parameters

$id
integer
$id
$data
array
$data
$current_data
array
$current_data

Returns

integer
post id

Throws

waException
public boolean
# deleteByField( mixed $field, mixed $value = null )

Delete records from table and related data

Delete records from table and related data

Parameters

$field
mixed
$field
$value
mixed
$value

Returns

boolean

Overrides

waModel::deleteByField()
public
# getAddedPostCount( mixed $datetime, mixed $blogs = null, mixed $get_posts = false )
public static
# getPureUrls( mixed $post )
public static
# getPreviewHash( mixed $options, mixed $regen_if_expired = true )
public array
# validate( array & $data, array $options = array() )

Validate data

Validate data

Parameters

$data
array
&$data
$options
array
$options

Returns

array
messages or empty array
public array|null
# getById( integer|array $id, mixed $exclude_fields = null )

Returns data from table record with specified value in id field ($this->id).

Returns data from table record with specified value in id field ($this->id).

Parameters

$id
integer|array
$value Field value or array of values
$exclude_fields

Returns

array|null

Overrides

waModel::getById()
public
# getFieldsById( mixed $id, mixed $fields = null )
Methods inherited from blogItemModel
buildSearchSQL(), checkUrl(), fetchSearch(), fetchSearchAll(), fetchSearchItem(), fetchSearchPage(), genUniqueUrl(), pageCount(), searchCount()
Methods inherited from waModel
__construct(), addCacheCleaner(), autocommit(), castValue(), commit(), countAll(), countByField(), createSchema(), database(), deleteById(), describe(), escape(), escapeField(), exec(), fieldExists(), getAll(), getByField(), getEmptyRow(), getFieldValue(), getMetadata(), getQueryConstructor(), getTableId(), getTableName(), getWhereByField(), insert(), isAutoIncrement(), multiInsert(), multipleInsert(), order(), ping(), prepare(), query(), replace(), rollback(), select(), setCache(), updateByField(), updateById(), where()
Constants summary
string STATUS_DRAFT 'draft'
#
string STATUS_DEADLINE 'deadline'
#
string STATUS_SCHEDULED 'scheduled'
#
string STATUS_PUBLISHED 'published'
#
Properties summary
protected string $table 'blog_post'
#

Name of the table

Name of the table

Properties inherited from blogItemModel
$extend_data, $extend_options, $obligatory_fields, $sql_params, $url_length, $where_conditions
Properties inherited from waModel
$adapter, $fields, $id, $type, $writable
My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0