PageManager
class PageManager
Class PageManager manages the creating of new pages, updating pages and removing and copying pages.
Properties
| array | $errors | Errors are kept in an array and can be used later if validation fails and we want to know why | |
| string | $message | This is a message that we can store why the validation failed |
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
at line 106
__construct(DvsPage $Page, PageVersionManager $PageVersionManager, PageVersionsRepository $PageVersionsRepository, FieldsRepository $FieldsRepository, FieldManager $FieldManager, Framework $Framework)
Construct a new page manager
at line 130
bool
createNewPage(array $input)
Validates and creates a page with the given input
at line 151
bool
updatePage(integer $id, array $input)
Validates and updates a page with the given input
at line 175
boolean
destroyPage(integer $id)
Destroys a page
at line 191
DvsPage
copyPage(integer $fromPageId, array $input)
Takes the input provided and runs the create method after stripping necessary fields.
at line 280
void
updatePageVersionDates(int $pageVersionId, array $input)
Updates the page version dates