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
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
at line 23
public
__construct(Page $Page, LanguageDetector $LanguageDetector, Field $Field, GlobalField $GlobalField, CollectionsRepository $CollectionsRepository)
Create a new PageRepostiry instance.
at line 38
public Page
find($id, $versionName = 'Default', $editing = false)
finds a record by it's id
at line 59
public Page
findByRouteName($name, $versionName = 'Default', $editing = false)
finds a record by it's slug
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
at line 97
public Page
pages()
calls paginate on Page
at line 113
public array
availableLanguagesForPage(integer $id)
List of all the languages available for a page
at line 139
public EloquentCollection[PageVersions]
getPageVersions($pageId, $selectedPageVersionId = null)
Get the versions of a page
at line 162
public Collection
getRouteList()
Get the route list for all the non admin pages
at line 187
public PageVersion
getLivePageVersion($page, $now = null)
Gets the live version of this page
at line 211
public PageVersion
getPageVersionByName(Page $page, string $versionName)
Gets the page version by name
at line 363
public [type]
getPagesList(boolean $includeAdmin = false, [type] $search = null)
[getPagesList description]