Devise
Class

Devise\Pages\Repositories\PagesRepository

class PagesRepository extends BaseRepository

Properties

Validator $validator The Validator instac
Array $message Any validation or error message
Array $errors Any array of error message

Methods

false simpleStore(Eloquent $model, array $input)

Accepts a model instance, input data, validates and saves a new record

from BaseRepository
false simpleUpdate(Eloquent $model, int $id, array $input)

Validates input data and updates a record will return false or an instance of the model

from BaseRepository
__construct(Page $Page, LanguageDetector $LanguageDetector, Field $Field, GlobalField $GlobalField, CollectionsRepository $CollectionsRepository)

Create a new PageRepostiry instance.

Page find($id, $versionName = 'Default', $editing = false)

finds a record by it's id

Page findByRouteName($name, $versionName = 'Default', $editing = false)

finds a record by it's slug

Page findLocalizedPage(Page $page)

See if a localized version of this page exists if there is no difference we return null

Page pages()

calls paginate on Page

array availableLanguagesForPage(integer $id)

List of all the languages available for a page

EloquentCollection[PageVersions] getPageVersions($pageId, $selectedPageVersionId = null)

Get the versions of a page

Collection getRouteList()

Get the route list for all the non admin pages

PageVersion getLivePageVersion($page, $now = null)

Gets the live version of this page

PageVersion getPageVersionByName(Page $page, string $versionName)

Gets the page version by name

[type] getPagesList(boolean $includeAdmin = false, [type] $search = null)

[getPagesList description]

Details

in BaseRepository at line 34
public false simpleStore(Eloquent $model, array $input)

Accepts a model instance, input data, validates and saves a new record

Parameters

Eloquent $model
array $input

Return Value

false | ParticipanLocation

in BaseRepository at line 56
public false simpleUpdate(Eloquent $model, int $id, array $input)

Validates input data and updates a record will return false or an instance of the model

Parameters

Eloquent $model
int $id
array $input

Return Value

false | Instance Of $model

at line 23
public __construct(Page $Page, LanguageDetector $LanguageDetector, Field $Field, GlobalField $GlobalField, CollectionsRepository $CollectionsRepository)

Create a new PageRepostiry instance.

Parameters

Page $Page
LanguageDetector $LanguageDetector
Field $Field
GlobalField $GlobalField
CollectionsRepository $CollectionsRepository

at line 38
public Page find($id, $versionName = 'Default', $editing = false)

finds a record by it's id

Parameters

$id
$versionName
$editing

Return Value

Page

at line 59
public Page findByRouteName($name, $versionName = 'Default', $editing = false)

finds a record by it's slug

Parameters

$name
$versionName
$editing

Return Value

Page

at line 83
public Page findLocalizedPage(Page $page)

See if a localized version of this page exists if there is no difference we return null

Parameters

Page $page

Return Value

Page

at line 97
public Page pages()

calls paginate on Page

Return Value

Page

at line 113
public array availableLanguagesForPage(integer $id)

List of all the languages available for a page

Parameters

integer $id

Return Value

array

at line 139
public EloquentCollection[PageVersions] getPageVersions($pageId, $selectedPageVersionId = null)

Get the versions of a page

Parameters

$pageId
$selectedPageVersionId

Return Value

EloquentCollection[PageVersions]

at line 162
public Collection getRouteList()

Get the route list for all the non admin pages

Return Value

Collection

at line 187
public PageVersion getLivePageVersion($page, $now = null)

Gets the live version of this page

Parameters

$page
$now

Return Value

PageVersion

at line 211
public PageVersion getPageVersionByName(Page $page, string $versionName)

Gets the page version by name

Parameters

Page $page
string $versionName

Return Value

PageVersion

at line 363
public [type] getPagesList(boolean $includeAdmin = false, [type] $search = null)

[getPagesList description]

Parameters

boolean $includeAdmin [description]
[type] $search [description]

Return Value

[type] [description]