class PrintdocumentManager extends BaseManager

Print document manager

Methods

object
save(object $obj)

Save handler, because DRY

Paginator
getPaginator(integer $page = 1, integer $limit = 50)

Helps paginate models using the query bulder. Bit more complicated than the native array method, but works better for larger data sets

boolean
restDelete(number $id)

Delete an object with rest

restCreate(array $data)

Create a new object

restUpdate(int $id, array $data)

Update an existing object

mixed
find(mixed $parameters = null)

Find document

mixed
findFirst(mixed $params = null)

Find first based on params

mixed
findFirstById(mixed $params = null)

Find first content by ID

mixed
findFirstByUuid($uuid)

Find first content by UUID

mixed
findFirstByLabel(string $label)

Find first item by label

mixed
findFirstByTrackingLabel(string $label)

Find first item by tracking label

object
create($input, $user = false)

No description

object
update($id, $input, $user = false)

Update print document object.

object
setPrintLock(integer $id, object $user, boolean $force = false)

Set the lock fields on a document. Technically, this is non-exclusive and non-binding.

object
removePrintLock(integer $id, object $user, boolean $force = false)

Unset the lock fields on a document. Document locks are non-exclusive.

delete($id)

No description

Details

in BaseManager at line line 23
object save(object $obj)

Save handler, because DRY

Parameters

object $obj Model to be saved

Return Value

object Model

Exceptions

Exception Json encoded string of validation errors

in BaseManager at line line 60
Paginator getPaginator(integer $page = 1, integer $limit = 50)

Helps paginate models using the query bulder. Bit more complicated than the native array method, but works better for larger data sets

Because it's based on Phalcon's QueryBuilder, it supports a fluent filtering interface:

    $manager = $this->foo_manager;
    $items = $manager->getPaginator(1, 20)
        ->orderBy('created_at desc')
        ->where('name = :name:', array('name' => $name))
        ->andWhere('type = :type:', array('type' => $type))
        ->paginate();

    echo json_encode($items);

Parameters

integer $page Current page
integer $limit Per page limit

Return Value

Paginator

in BaseManager at line line 80
boolean restDelete(number $id)

Delete an object with rest

Parameters

number $id

Return Value

boolean

Exceptions

Exception

in BaseManager at line line 103
restCreate(array $data)

Create a new object

Parameters

array $data

in BaseManager at line line 117
restUpdate(int $id, array $data)

Update an existing object

Parameters

int $id
array $data

at line line 25
mixed find(mixed $parameters = null)

Find document

Parameters

mixed $parameters

Return Value

mixed

at line line 35
mixed findFirst(mixed $params = null)

Find first based on params

Parameters

mixed $params

Return Value

mixed

at line line 45
mixed findFirstById(mixed $params = null)

Find first content by ID

Parameters

mixed $params

Return Value

mixed

at line line 55
mixed findFirstByUuid($uuid)

Find first content by UUID

Parameters

$uuid

Return Value

mixed

at line line 65
mixed findFirstByLabel(string $label)

Find first item by label

Parameters

string $label

Return Value

mixed

at line line 75
mixed findFirstByTrackingLabel(string $label)

Find first item by tracking label

Parameters

string $label

Return Value

mixed

at line line 84
object create($input, $user = false)

Parameters

$input
$user

Return Value

object PrintDocument

at line line 113
object update($id, $input, $user = false)

Update print document object.

Parameters

$id
$input
$user

Return Value

object PrintDocument

at line line 187
object setPrintLock(integer $id, object $user, boolean $force = false)

Set the lock fields on a document. Technically, this is non-exclusive and non-binding.

Parameters

integer $id Document ID
object $user locking user
boolean $force force a lock

Return Value

object Document

at line line 220
object removePrintLock(integer $id, object $user, boolean $force = false)

Unset the lock fields on a document. Document locks are non-exclusive.

Parameters

integer $id Document ID
object $user locking user
boolean $force force an unlock

Return Value

object Document

at line line 242
delete($id)

Parameters

$id