\Ceo\Api\ModelsDraft

Drafts model

Drafts are intended to be non-durable and could be purged at any time. Drafts should not be relied upon to be a replacement for versioning.

Summary

Methods
Properties
Constants
getResultsetClass()
hasProperty()
setRelated()
initialize()
getSource()
find()
findFirst()
findFirstByContentId()
$id
$version
$content
$content_raw
$created_at
$content_id
$user_id
No constants found
toArrayRelated()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

ID

Type

integer

$version

$version : integer

This version

Type

integer

$content

$content : string

Parent content

Type

string

$content_raw

$content_raw : string

Parent content object

Type

string

$created_at

$created_at : string

Parent created_at

Type

string

$content_id

$content_id : integer

Parent content ID

Type

integer

$user_id

$user_id : integer

Editing user ID

Type

integer

Methods

getResultsetClass()

getResultsetClass() 

hasProperty()

hasProperty(string  $str) : boolean

Determine if the model has a public property.

Useful in determining valid sorting options on the front end.

Parameters

string $str

Property

Returns

boolean

setRelated()

setRelated(string  $relation, mixed  $value = array()) : self

Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.

I think it has something to do with implicit transactions, but I'm not entirely sure...

Parameters

string $relation
mixed $value

Returns

self

initialize()

initialize() : self

Initializer

Returns

self

getSource()

getSource() : string

Returns table name mapped in the model.

Returns

string

find()

find(mixed  $parameters = null) : array<mixed,\Ceo\Api\Models\Versions>

Allows to query a set of records that match the specified conditions

Parameters

mixed $parameters

Returns

array<mixed,\Ceo\Api\Models\Versions>

findFirst()

findFirst(mixed  $parameters = null) : \Ceo\Api\Models\Versions

Allows to query the first record that match the specified conditions

Parameters

mixed $parameters

Returns

\Ceo\Api\Models\Versions

findFirstByContentId()

findFirstByContentId(  $id) 

Parameters

$id

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array