Entry
extends BaseModel
in package
Base model methods
Table of Contents
- $ceo_id : int
- Internal CEO ID
- $channel_id : int
- Parent channel ID
- $created_at : datetime
- Created timestamp
- $field_data : string
- Field data, stored as JSON
- $id : int
- internal id
- $modified_at : datetime
- Last modified timestamp
- $slug : string
- Base slug
- $sort_order : array<string|int, mixed>
- Sort order
- $title : string
- Title
- $uuid : string
- CEO UUID
- $_fieldStack : mixed
- __call() : mixed
- __toString() : string
- If the entry is called as a string, simply return the UUID
- afterFetch() : mixed
- afterSave() : mixed
- beforeCreate() : mixed
- beforeSave() : mixed
- find() : ResultSet
- Allows to query a set of records that match the specified conditions
- findFirst() : ResultSet
- Allows to query the first record that match the specified conditions
- getCanonicalUrl() : mixed
- getFields() : array<string|int, mixed>
- Fetch and transform field data.
- getFriendlyUrl() : mixed
- getMetadata() : mixed
- getResultsetClass() : mixed
- getSource() : mixed
- hasProperty() : bool
- Determine if the model has a public property.
- initialize() : mixed
- orderedFields() : mixed
- setRelated() : self
- Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.
- toArray() : mixed
- toCompat() : object
- Returns a base CEO model as a Gryphon compatible one.
- toArrayRelated() : mixed
- handleField() : mixed
Properties
$ceo_id
Internal CEO ID
public
int
$ceo_id
$channel_id
Parent channel ID
public
int
$channel_id
$created_at
Created timestamp
public
datetime
$created_at
$field_data
Field data, stored as JSON
public
string
$field_data
$id
internal id
public
int
$id
$modified_at
Last modified timestamp
public
datetime
$modified_at
$slug
Base slug
public
string
$slug
$sort_order
Sort order
public
array<string|int, mixed>
$sort_order
$title
Title
public
string
$title
$uuid
CEO UUID
public
string
$uuid
$_fieldStack
private
mixed
$_fieldStack
= []
Methods
__call()
public
__call(mixed $key[, mixed $args = [] ]) : mixed
Parameters
- $key : mixed
- $args : mixed = []
Return values
mixed —__toString()
If the entry is called as a string, simply return the UUID
public
__toString() : string
Return values
string —afterFetch()
public
afterFetch() : mixed
Return values
mixed —afterSave()
public
afterSave() : mixed
Return values
mixed —beforeCreate()
public
beforeCreate() : mixed
Return values
mixed —beforeSave()
public
beforeSave() : mixed
Return values
mixed —find()
Allows to query a set of records that match the specified conditions
public
static find([mixed $parameters = null ]) : ResultSet
Parameters
- $parameters : mixed = null
Return values
ResultSet —findFirst()
Allows to query the first record that match the specified conditions
public
static findFirst([mixed $parameters = null ]) : ResultSet
Parameters
- $parameters : mixed = null
Return values
ResultSet —getCanonicalUrl()
public
getCanonicalUrl() : mixed
Return values
mixed —getFields()
Fetch and transform field data.
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —of Entryfield Objects
getFriendlyUrl()
public
getFriendlyUrl() : mixed
Return values
mixed —getMetadata()
public
getMetadata(mixed $k) : mixed
Parameters
- $k : mixed
Return values
mixed —getResultsetClass()
public
getResultsetClass() : mixed
Return values
mixed —getSource()
public
getSource() : mixed
Return values
mixed —hasProperty()
Determine if the model has a public property.
public
hasProperty(string $str) : bool
Useful in determining valid sorting options on the front end.
Parameters
- $str : string
-
Property
Return values
bool —initialize()
public
initialize() : mixed
Return values
mixed —orderedFields()
public
orderedFields() : mixed
Return values
mixed —setRelated()
Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.
public
setRelated(string $relation[, mixed $value = [] ]) : self
I think it has something to do with implicit transactions, but I'm not entirely sure...
Parameters
- $relation : string
- $value : mixed = []
Return values
self —toArray()
public
toArray([mixed $props = null ][, mixed $asChild = false ]) : mixed
Parameters
- $props : mixed = null
- $asChild : mixed = false
Return values
mixed —toCompat()
Returns a base CEO model as a Gryphon compatible one.
public
toCompat([mixed $useKlass = null ]) : object
{% set article = fetch('article').order('published_at desc').find() %} {{ article[0].toCompat().url }}
Parameters
- $useKlass : mixed = null
Return values
object —toArrayRelated()
protected
toArrayRelated(mixed $ops, mixed $array) : mixed
Parameters
- $ops : mixed
- $array : mixed
Return values
mixed —handleField()
private
handleField(mixed $field) : mixed
Parameters
- $field : mixed