\Ceo\Core\ModelsContainer

Container model. Containers are like sections, but act like waterfall folders They can exist in two forms - manual or automatic.

Manual containers have content assinged and ordered, while automatic containers act like Gryphon sections and use tags to relate content.

Summary

Methods
Properties
Constants
getSrn()
findFirstBySrn()
pushToConnector()
getResultsetClass()
hasProperty()
setRelated()
connectableCallback()
initialize()
beforeValidation()
validation()
beforeSave()
afterSave()
afterFetch()
getSource()
find()
findFirst()
toArray()
getMetaProperties()
$id
$uuid
$slug
$title
$type
$description
$description_raw
$sort_order
$created_at
$modified_at
$published_at
$layout_template
No constants found
toArrayRelated()
No protected properties found
N/A
No private methods found
$srn_name
N/A

Properties

$id

$id : integer

Container ID

Type

integer

$uuid

$uuid : string

Container UUID

Type

string

$slug

$slug : string

Container slug

Type

string

$title

$title : string

Container title

Type

string

$type

$type : string

Container type

Type

string

$description

$description : string

Container description

Type

string

$description_raw

$description_raw : string

Container description raw json

Type

string

$sort_order

$sort_order : string

Container sorted content IDs

Type

string

$created_at

$created_at : string

Created timestamp

Type

string

$modified_at

$modified_at : string

Last modified timestamp

Type

string

$published_at

$published_at : string

Published at timestamp

Type

string

$layout_template

$layout_template : string

Layout template for frontend system

Type

string

$srn_name

$srn_name : string

SRN Name

Type

string

Methods

getSrn()

getSrn() : string

Return model's SRN. Model should implement a 'srn_name' protected value.

Otherwise, this will pull from the 'getSource' method

Returns

string —

SRN

findFirstBySrn()

findFirstBySrn(string  $srn) : object

Find model by SRN

Parameters

string $srn

complete SRN

Returns

object —

Model object

pushToConnector()

pushToConnector(  $kwargs = array()) 

Push items to connected front end

Parameters

$kwargs

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

connectableCallback()

connectableCallback() 

initialize()

initialize() 

Initializer

beforeValidation()

beforeValidation() 

validation()

validation() 

beforeSave()

beforeSave() 

afterSave()

afterSave() 

afterFetch()

afterFetch() 

getSource()

getSource() : string

Returns table name mapped in the model.

Returns

string

find()

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

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

Parameters

mixed $parameters

Returns

array<mixed,\Ceo\Core\Models\Assignment>

findFirst()

findFirst(mixed  $parameters = null) : \Ceo\Core\Models\Assignment

Allows to query the first record that match the specified conditions

Parameters

mixed $parameters

Returns

\Ceo\Core\Models\Assignment

toArray()

toArray(array  $ops = false) : array

Array override

Parameters

array $ops

Options for generation

Returns

array

getMetaProperties()

getMetaProperties() : array

Returns

array —

Keyed array

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array