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, 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 |
Details
at line 85
public
__construct(DvsPage $Page, PageVersionManager $PageVersionManager, Framework $Framework)
Construct a new page manager
at line 98
public bool
createNewPage(array $input)
Validates and creates a page with the given input
at line 118
public bool
updatePage(integer $id, array $input)
Validates and updates a page with the given input
at line 146
public boolean
destroyPage(integer $id)
Destroys a page
at line 160
public DvsPage
copyPage(integer $fromPageId, array $input)
Takes the input provided and runs the create method after stripping necessary fields.
at line 246
public void
updatePageVersionDates(int $pageVersionId, array $input)
Updates the page version dates