Documentation

Post extends BaseModel
in package
Uses Searchable

Base model methods

Table of Contents

$abstract  : string
Abstract
$ceo_id  : int
Internal CEO ID
$container_id  : int
Parent blog container
$content  : string
Parsed story content
$created_at  : datetime
Created timestamp
$headline  : string
Headline
$id  : int
internal id
$infobox  : string
Infobox
$media_id  : int
Dominant Media
$metadata  : object
Metadata object
$modified_at  : datetime
Last modified timestamp
$published_at  : datetime
Published timestamp
$short_token  : string
Short token
$slug  : string
Base slug
$ssts_id  : int
SSTS id
$ssts_path  : string
SSTS path
$status  : bool
Publication status
$subhead  : string
Subhed
$template  : string
Path to special template
$uuid  : string
CEO UUID
afterFetch()  : mixed
afterSave()  : 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
getFriendlyUrl()  : mixed
getIsPublished()  : mixed
getMetadata()  : mixed
getResultsetClass()  : mixed
getSearchDate()  : DateTime
Determine the display time
getSearchPreview()  : string
Determine the preview text
getSearchPreviewUrl()  : mixed
Determine the preview image, if there is one FALSE otherwise
getSearchTitle()  : string
Determine the search title for an item
getSearchType()  : string
Determine the model type
getSearchUrl()  : string
Determine the canonical url
getShortUrl()  : mixed
getSource()  : mixed
hasProperty()  : bool
Determine if the model has a public property.
initialize()  : 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.
wherePublished()  : mixed
toArrayRelated()  : mixed

Properties

$abstract

Abstract

public string $abstract

$ceo_id

Internal CEO ID

public int $ceo_id

$container_id

Parent blog container

public int $container_id

$content

Parsed story content

public string $content

$created_at

Created timestamp

public datetime $created_at

$headline

Headline

public string $headline

$id

internal id

public int $id

$infobox

Infobox

public string $infobox

$media_id

Dominant Media

public int $media_id

$metadata

Metadata object

public object $metadata

$modified_at

Last modified timestamp

public datetime $modified_at

$published_at

Published timestamp

public datetime $published_at

$short_token

Short token

public string $short_token

$slug

Base slug

public string $slug

$ssts_id

SSTS id

public int $ssts_id

$ssts_path

SSTS path

public string $ssts_path

$status

Publication status

public bool $status

$subhead

Subhed

public string $subhead

$template

Path to special template

public string $template

$uuid

CEO UUID

public string $uuid

Methods

afterFetch()

public afterFetch() : mixed
Return values
mixed

afterSave()

public afterSave() : 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

getFriendlyUrl()

public getFriendlyUrl() : mixed
Return values
mixed

getIsPublished()

public getIsPublished() : mixed
Return values
mixed

getMetadata()

public getMetadata(mixed $k) : mixed
Parameters
$k : mixed
Return values
mixed

getResultsetClass()

public getResultsetClass() : mixed
Return values
mixed

getSearchDate()

Determine the display time

public getSearchDate() : DateTime
Return values
DateTime

Carbon

getSearchPreview()

Determine the preview text

public getSearchPreview() : string
Return values
string

getSearchPreviewUrl()

Determine the preview image, if there is one FALSE otherwise

public getSearchPreviewUrl() : mixed
Return values
mixed

STRING or BOOLEAN

getSearchTitle()

Determine the search title for an item

public getSearchTitle() : string
Return values
string

getSearchType()

Determine the model type

public getSearchType() : string
Return values
string

getSearchUrl()

Determine the canonical url

public getSearchUrl() : string
Return values
string

getShortUrl()

public getShortUrl() : 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

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
Parameters
$props : mixed = null
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

wherePublished()

public wherePublished() : mixed
Return values
mixed

toArrayRelated()

protected toArrayRelated(mixed $ops, mixed $array) : mixed
Parameters
$ops : mixed
$array : mixed
Return values
mixed

Search results