class Draft extends BaseModel

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.

Properties

integer $id ID
integer $version This version
string $content Parent content
string $content_raw Parent content object
string $created_at Parent created_at
integer $content_id Parent content ID
integer $user_id Editing user ID

Methods

getResultsetClass()

No description

from BaseModel
boolean
hasProperty(string $str)

Determine if the model has a public property.

from BaseModel
setRelated(string $relation, mixed $value = array())

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

from BaseModel
initialize()

Initializer

string
getSource()

Returns table name mapped in the model.

static Versions[]
find(mixed $parameters = null)

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

static Versions
findFirst(mixed $parameters = null)

Allows to query the first record that match the specified conditions

static 
findFirstByContentId($id)

No description

Details

in BaseModel at line line 13
getResultsetClass()

in BaseModel at line line 25
boolean hasProperty(string $str)

Determine if the model has a public property.

Useful in determining valid sorting options on the front end.

Parameters

string $str Property

Return Value

boolean

in BaseModel at line line 40
BaseModel setRelated(string $relation, mixed $value = array())

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

Return Value

BaseModel

at line line 65
Draft initialize()

Initializer

Return Value

Draft

at line line 100
string getSource()

Returns table name mapped in the model.

Return Value

string

at line line 111
static Versions[] find(mixed $parameters = null)

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

Parameters

mixed $parameters

Return Value

Versions[]

at line line 122
static Versions findFirst(mixed $parameters = null)

Allows to query the first record that match the specified conditions

Parameters

mixed $parameters

Return Value

Versions

at line line 127
static findFirstByContentId($id)

Parameters

$id