Properties

$id

$id : integer

Assignment ID

Type

integer

$uuid

$uuid : string

Assignment UUID

Type

string

$slug

$slug : string

Assignment slug

Type

string

$type

$type : string

Assignment type

Type

string

$title

$title : string

Assignment title

Type

string

$abstract

$abstract : string

Assignment abstract

Type

string

$content

$content : string

Assignment content

Type

string

$notes

$notes : string

Editor/Production notes

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

Publish timestamp

Type

string

$due_at

$due_at : string

Due date timestamp

Type

string

$creator_id

$creator_id : integer

Creating user

Type

integer

$workflow_id

$workflow_id : integer

Workflow ID

Type

integer

$contact_name

$contact_name : string

Assignment contact name

Type

string

$contact_phone

$contact_phone : string

Assignment contact name

Type

string

$location

$location : string

Location of assignment

Type

string

$action_start_time

$action_start_time : string

Start time of assignment timestamp

Type

string

$action_end_time

$action_end_time : string

End time of assignment timestamp

Type

string

$pushable_defaults

$pushable_defaults : 

Type

$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

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

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\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

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array