PagesRepository
class PagesRepository
Class PagesRepository is used to search and retrieve DvsPage models and things in context of a Devise Page.
Methods
Create a new PageRepostiry instance.
finds a record by it's id
finds a record by it's id and provide version and field data
finds a record by it's slug
Finds the DvsPage by a route name and preview hash
See if a localized version of this page exists if there is no difference we return null
Find the page variables for this given page
Find the page templates for this given page
Finds lots of pages in the system that are not admin pages and belong to the current language
List of all the languages available for a page
Get the versions of a page
Get the route list for all the non admin pages
Gets the live version of this page
Gets the page version by name
Gets a list of pages in array format probably used for drop down boxes.
Gets a list of languages that the page has not been translated to or originates from
Get the list of available views
Details
at line 44
__construct(DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, LanguageDetector $LanguageDetector, CollectionsRepository $CollectionsRepository, $Input = null, $Config = null, $URL = null, $File = null, $ViewOpener = null)
Create a new PageRepostiry instance.
at line 69
Page
find($id)
finds a record by it's id
at line 87
Page
findWithVersion(int $id, string $versionName = null, bool $editing = false)
finds a record by it's id and provide version and field data
at line 115
Page
findByRouteName($name, string $versionName = null, bool $editing = false)
finds a record by it's slug
at line 141
DvsPage
findByRouteNameAndPreviewHash(string $name, string $previewHash)
Finds the DvsPage by a route name and preview hash
at line 173
Page
findLocalizedPage(Page $page)
See if a localized version of this page exists if there is no difference we return null
at line 188
[type]
findTemplateVariables($templates)
Find the page variables for this given page
at line 210
[type]
findPageTemplates([type] $page)
Find the page templates for this given page
at line 233
Page
pages()
Finds lots of pages in the system that are not admin pages and belong to the current language
at line 262
array
availableLanguagesForPage(integer $id)
List of all the languages available for a page
at line 303
EloquentCollection[PageVersions]
getPageVersions(integer $pageId, null $selectedPageVersionId = null)
Get the versions of a page
at line 326
Collection
getRouteList()
Get the route list for all the non admin pages
at line 358
PageVersion
getLivePageVersion($page)
Gets the live version of this page
at line 382
PageVersion
getPageVersionByName(Page $page, string $versionName)
Gets the page version by name
at line 395
array
getPagesList(boolean $includeAdmin = false, string $search = null)
Gets a list of pages in array format probably used for drop down boxes.
at line 425
array
getUnUsedLanguageList(integer $pageId, array $languages)
Gets a list of languages that the page has not been translated to or originates from
at line 442
array
availableViewsList()
Get the list of available views