Properties

$id

$id : integer

ID

Type

integer

$uuid

$uuid : string

UUID

Type

string

$title

$title : string

Title/Headline

Type

string

$title_url

$title_url : string

Default url dirived from title

Type

string

$slug

$slug : string

Content slug

Type

string

$type

$type : string

User-definable type

Type

string

$version

$version : integer

Version number (not ID)

Type

integer

$abstract

$abstract : string

Abstract

Type

string

$abstract_raw

$abstract_raw : string

Abstract Raw contains the raw Draft object

Type

string

$content

$content : string

Content

Type

string

$content_raw

$content_raw : string

Content raw contains the raw Draft object

Type

string

$created_at

$created_at : string

Created timestamp

Type

string

$modified_at

$modified_at : string

Modified timestamp

Type

string

$published_at

$published_at : string

Published timestamp

Type

string

$state

$state : integer

Workflow state

Type

integer

$user_id

$user_id : integer

Editing user ID

Type

integer

$assignment_id

$assignment_id : integer

Parent assignment ID

Type

integer

$workflow_id

$workflow_id : integer

Workflow ID

Type

integer

$weight

$weight : integer

Content weight.

DEPRECATED. Provided for Gryphon compatability

Type

integer

$dominant_attachment_id

$dominant_attachment_id : integer

Dominant attachment reference

Type

integer

$container_id

$container_id : integer

Container id, mostly just for blogs

Type

integer

$layout_template

$layout_template : string

Layout template for frontend system

Type

string

$click_through

$click_through : string

Click through URL for media

Type

string

$batch

$batch : string

Upload batch identifier

Type

string

$folder_id

$folder_id : integer

Folder ID

Type

integer

$seo_title

$seo_title : string

SEO Title

Type

string

$seo_description

$seo_description : string

SEO Description

Type

string

$seo_url

$seo_url : string

SEO Image URL

Type

string

$srn_name

$srn_name : string

SRN name

Type

string

$pushable_defaults

$pushable_defaults : 

Type

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

setPushableOptions()

setPushableOptions(array  $opts = array()) 

Set default pushable options for model, uses an array with the keys

  • category - string socket category user is subscribed to
  • related - array of related properties to include when serializing

Example:

class Content extends BaseModel
{
   use Pushable;
   ...
   $this->setPushableOptions([
      'category' => 'contentupdate',
      'related' => [
          'export',
          'authors',
          'tags',
          'assignment',
          'attachment',
          'audit',
          'export',
          'dominantAttachment'
      ]
  ]
}

Parameters

array $opts

pushToSocket()

pushToSocket(array  $kwargs = array()) 

Push the model to the web socket server via the queue service Options are set as keyword arguments in the form of <ul> <li>category - (string) supplemental category</li> <li>options - (array) override options, see setPushableOptions for more info</li> </ul>

Parameters

array $kwargs

pushToConnector()

pushToConnector(  $kwargs = array()) 

Push items to connected front end

Parameters

$kwargs

extractKeywords()

extractKeywords() 

emitEvent()

emitEvent(\Ceo\Core\Traits\const  $event, array  $data = array()) : \Ceo\Core\Traits\Event

Emit event

Parameters

\Ceo\Core\Traits\const $event
array $data

Returns

\Ceo\Core\Traits\Event

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() 

Initializer

beforeValidation()

beforeValidation() 

validation()

validation() 

getSource()

getSource() : string

Returns table name mapped in the model.

Returns

string

find()

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

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

Parameters

mixed $parameters

Returns

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

findFirst()

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

Allows to query the first record that match the specified conditions

Parameters

mixed $parameters

Returns

\Ceo\Core\Models\Content

toArray()

toArray(array  $ops = false) : array

Array override

Parameters

array $ops

Options for generation

Returns

array

getVersionMetaProperties()

getVersionMetaProperties() : array

Returns only the metaProperties that belong to this version of the content item

Returns

array —

Keyed array of content items, with fields as keys

getAuditTrail()

getAuditTrail(  $params = array()) : array

Return audit logs for this content item

Parameters

$params

Returns

array —

Collection of AuditLog objects

getKeywords()

getKeywords() 

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array

getUrlArray()

getUrlArray()