expRecord

This is the class expRecord

subpackage

Models

package

Core

Methods

__construct

__construct(null $params = null, boolean $get_assoc = true, boolean $get_attached = true) 
Throws
\ReflectionException

Arguments

$params

null

$get_assoc

boolean

$get_attached

boolean

after creating item

afterCreate() 

is run after deleting item, should delete associated items here if needed

afterDelete() 

after saving item

afterSave() 

after updating item

afterUpdate() 

after validating item

afterValidation() 

after validating item during creation

afterValidationOnCreate() 

after validating item during update

afterValidationOnUpdate() 

get objects this item belongs to ??

associateWith( $datatype,  $id) 

Type of associations has_and_belongs_to_many

Arguments

$datatype

$id

attach to item

attachItem( $item, string $subtype = '', boolean $replace = true) : boolean

Arguments

$item

$subtype

string

$replace

boolean

Response

boolean

before creating item

beforeCreate() 

is run before deleting item

beforeDelete() 

before saving item

beforeSave() 

before updating item

beforeUpdate() 

before validating item

beforeValidation() 

before validating item during creation

beforeValidationOnCreate() 

before validating item during update

beforeValidationOnUpdate() 

Adds table fields as class properties to current "record" class.

build(mixed $params = array()) 

Loads Table schema data and creates new class properties based upon the fields in given table.

Additionally, if a record ID is given, that record is pulled and field values are also populated into class properties.

category

db_record

uses

Builds a data definition from existing table.

requires

$db

access

protected

final
PHPUnit

Not Defined

global

object $db

Arguments

$params

mixed

array or Object for table selection

check for what objects may be attached

checkForAttachableItems( $params) : boolean

Arguments

$params

Response

boolean

delete item

delete(string $where = '') : boolean

Arguments

$where

string

Response

boolean

find an item or items

find(string $range = 'all', null $where = null, null $order = null, null $limit = null, integer $limitstart, boolean $get_assoc = true, boolean $get_attached = true, array $except = array(), boolean $cascade_except = false) : array|integer

Arguments

$range

string

$where

null

$order

null

$limit

null

$limitstart

integer

$get_assoc

boolean

$get_attached

boolean

$except

array

$cascade_except

boolean

Response

array|integer

find an item by column

findBy( $column,  $value, boolean $get_assoc = true, boolean $get_attached = true, array $except = array(), boolean $cascade_except = false) : array

Arguments

$column

$value

$get_assoc

boolean

$get_attached

boolean

$except

array

$cascade_except

boolean

Response

array

find a value(s) by column

findValue(string $range = 'all', string $column, string $where = null, string $order = null, boolean $distinct = false) : array|boolean

Arguments

$range

string

$column

string

$where

string

$order

string

$distinct

boolean

Response

array|boolean

this function finds models that have this attachable item attached

findWhereAttachedTo( $content_type) : array

Arguments

$content_type

Response

array

get item's associated objects

getAssociatedObjects(null $obj = null) : null

Type of associations has_one has_many has_and_belongs_to_many

Arguments

$obj

null

Response

null

gets associated objects for this model

getAssociatedObjectsForThisModel(array $except = array(), boolean $cascade_except = false) 

Type of associations has_extended_fields has_one has_many has_many_self has_and_belongs_to_many has_and_belongs_to_self

Arguments

$except

array

$cascade_except

boolean

get attached objects for this item

getAttachableItems() 

used for import/export

getAttachableItemTables() : array

Response

array

return the item poster

getPoster(null $display = null) : null|string

Arguments

$display

null

Response

null|string

return the item timestamp

getTimestamp(integer $type) : mixed

Arguments

$type

integer

Response

mixed

is model content searchable?

isSearchable() : boolean
static

Response

boolean

create a many to many table relationship

makeManyToManyTablename( $assoc_table) : string

Arguments

$assoc_table

Response

string

make an sef_url for item

makeSefUrl() 

name of module for backwards compat with old modules

name() : string

Response

string

re-construct the item from the database

refresh() : boolean
Throws
\ReflectionException

Response

boolean

rerank items

rerank( $direction, string $where = '') 

Arguments

$direction

$where

string

save item

save(boolean $validate = false, boolean $force_no_revisions = false) 

Arguments

$validate

boolean

$force_no_revisions

boolean

save associated objects

saveAssociatedObjects() 

Type of associations has_one

update item

update(array|object $params = array()) 

Arguments

$params

array|object

validate item sef_url

validate() : boolean

Response

boolean

Properties

classinfo

classinfo : 

Type(s)

classname

classname : 

Type(s)

tablename

tablename : 

Type(s)

identifier

identifier : 

Type(s)

rank_by_field

rank_by_field : 

Type(s)

grouping_sql

grouping_sql : 

Type(s)

has_extended_fields

has_extended_fields : 

Type(s)

has_one

has_one : 

Type(s)

has_many

has_many : 

Type(s)

has_many_self

has_many_self : 

Type(s)

has_and_belongs_to_many

has_and_belongs_to_many : 

Type(s)

has_and_belongs_to_self

has_and_belongs_to_self : 

Type(s)

default_sort_field

default_sort_field : 

Type(s)

default_sort_direction

default_sort_direction : 

Type(s)

get_assoc_for

get_assoc_for : 

Type(s)

attachable_item_types

attachable_item_types : 

Type(s)

attachable_items_to_save

attachable_items_to_save : 

Type(s)

get_attachable_for

get_attachable_for : 

Type(s)

validate

validate : 

Type(s)

do_not_validate

do_not_validate : 

Type(s)

supports_revisions

supports_revisions : 

Type(s)

needs_approval

needs_approval : 

Type(s)