Devise
Class

Devise\Pages\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, 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

Parameters

DvsPage $Page
PageVersionManager $PageVersionManager
Framework $Framework

at line 98
public bool createNewPage(array $input)

Validates and creates a page with the given input

Parameters

array $input a$input

Return Value

bool

at line 118
public bool updatePage(integer $id, array $input)

Validates and updates a page with the given input

Parameters

integer $id
array $input

Return Value

bool

at line 146
public boolean destroyPage(integer $id)

Destroys a page

Parameters

integer $id

Return Value

boolean

at line 160
public 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

at line 246
public void updatePageVersionDates(int $pageVersionId, array $input)

Updates the page version dates

Parameters

int $pageVersionId
array $input

Return Value

void