class ApiPagesManager extends PageManager

Class ApiPagesManager manages the creating of new pages, updating pages

Properties

array $errors Errors are kept in an array and can be used later if validation fails and we want to know why from PageManager
string $message This is a message that we can store why the validation failed from PageManager

Methods

__construct(DvsPage $Page, PageVersionManager $PageVersionManager, PageVersionsRepository $PageVersionsRepository, FieldsRepository $FieldsRepository, FieldManager $FieldManager, Framework $Framework)

Construct a new page manager

bool
createNewPage(array $input)

Validates and creates a page with the given input

bool
updatePage(integer $id, array $input)

Validates and updates a page with the given input

boolean
destroyPage(integer $id)

Destroys a page

DvsPage
copyPage(integer $fromPageId, array $input)

Takes the input provided and runs the create method after stripping necessary fields.

void
updatePageVersionDates(int $pageVersionId, array $input)

Updates the page version dates

markContentRequestedFieldsComplete($pageId)

No description

Details

in PageManager at line 106
__construct(DvsPage $Page, PageVersionManager $PageVersionManager, PageVersionsRepository $PageVersionsRepository, FieldsRepository $FieldsRepository, FieldManager $FieldManager, Framework $Framework)

Construct a new page manager

Parameters

DvsPage $Page
PageVersionManager $PageVersionManager
PageVersionsRepository $PageVersionsRepository
FieldsRepository $FieldsRepository
FieldManager $FieldManager
Framework $Framework

at line 37
bool createNewPage(array $input)

Validates and creates a page with the given input

Parameters

array $input a$input

Return Value

bool

in PageManager at line 151
bool updatePage(integer $id, array $input)

Validates and updates a page with the given input

Parameters

integer $id
array $input

Return Value

bool

in PageManager at line 175
boolean destroyPage(integer $id)

Destroys a page

Parameters

integer $id

Return Value

boolean

in PageManager at line 191
DvsPage copyPage(integer $fromPageId, array $input)

Takes the input provided and runs the create method after stripping necessary fields.

Parameters

integer $fromPageId
array $input

Return Value

DvsPage

in PageManager at line 280
void updatePageVersionDates(int $pageVersionId, array $input)

Updates the page version dates

Parameters

int $pageVersionId
array $input

Return Value

void

in PageManager at line 285
markContentRequestedFieldsComplete($pageId)

Parameters

$pageId