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

  • blogCategory
  • blogCategoryModel
  • blogCategoryPlugin
  • blogCategoryPostModel
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class blogCategoryModel

waModel
Extended by blogCategoryModel
Package: wa-apps\blog\plugin\category
Located at wa-apps/blog/plugins/category/lib/models/blogCategory.model.php
Methods summary
public
# get( mixed $ids = array() )
public
# getByPost( integer|array $post_id )

Get post(s) categories

Parameters

$post_id
integer|array
$post_id
public
# sort( mixed $id, mixed $sort )
public
# recalculate( mixed $ids = array() )
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()
private
# genUniqueUrl( mixed $from, mixed $id = null )
public boolean|null|waDbResultUpdate
# updateByField( string|array $field, string $value, array $data = null, string $options = null, boolean $return_object = false )

Updates the contents of records containing the specified field values. Method accepts parameters in two different modes:

  • for searching values in one field
  • for searching values in several fields

Updates the contents of records containing the specified field values. Method accepts parameters in two different modes:

  • for searching values in one field
  • for searching values in several fields

Parameters

$field
string|array
$field (single field) Name of the table field whose value needs to be updated. (multiple fields) Associative array of table fields by whose values table records must be searched.
$value
string
$value (single field) Existing value of the specified field, which needs to be replaced with a new value. Instead of one searched value, you may specify an array; in this case the specified field is updated for all records where field's value matches one of array items.
$data
array
$data Associative array of new values to be updated for found records.
$options
string
$options Optional key words for SQL query UPDATE: LOW_PRIORITY or IGNORE.
$return_object
boolean
$return_object (single field) Flag requiring to return an instance of class waDbResultUpdate to enable you to call its public methods to access response received from database server. By default (false) method returns a Boolean value identifying the successful query result, or null if incorrect parameters have been passed.

Returns

boolean|null|waDbResultUpdate
Result of query execution

Example

<pre> // Update by one field and one value $this->updateByField('field_name', $value, $data, $options); // Update by one field and multiple values $this->updateByField('field_name', array($value1, $value2), $data, $options); // Update by multiple fields and values $this->updateByField(array('field1' => $value1, 'field2' => $value2), $data, $options); </pre>

Overrides

waModel::updateByField()
public resource|integer|boolean
# insert( array $data, integer $type = 0 )

Inserts a new record into the table.

Inserts a new record into the table.

Parameters

$data
array
$data Associative array of values with keys matching the names of table fields.
$type
integer
$type Execution mode for SQL query INSERT: 0: query is executed without additional conditions (default mode) 1: query is executed with condition ON DUPLICATE KEY UPDATE 2: query is executed with key word IGNORE

Returns

resource|integer|boolean
Returns result object or id of newly added record (if id field has AUTO_INCREMENT property) or true (if there are no data to be inserted)

Overrides

waModel::insert()
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(), isAutoIncrement(), multiInsert(), multipleInsert(), order(), ping(), prepare(), query(), replace(), rollback(), select(), setCache(), updateById(), where()
Properties summary
protected string $table 'blog_category'
#

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