class PagesRepository
Class PagesRepository is used to search and retrieve DvsPage models and things in context of a Devise Page.
Methods
|
__construct(DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, LanguageDetector $LanguageDetector, CollectionsRepository $CollectionsRepository, $Input = null, $Config = null, $URL = null, $File = null)
Create a new PageRepostiry instance. |
||
| Page |
find(int $id, string $versionName = 'Default', bool $editing = false)
finds a record by it's id |
|
| Page |
findByRouteName($name $name, string $versionName = null, bool $editing = false)
finds a record by it's slug |
|
| DvsPage |
findByRouteNameAndPreviewHash(string $name, string $previewHash)
Finds the DvsPage by a route name and preview hash |
|
| Page |
findLocalizedPage(Page $page)
See if a localized version of this page exists if there is no difference we return null |
|
| Page |
pages()
Finds lots of pages in the system that are not admin pages and belong to the current language |
|
| array |
availableLanguagesForPage(integer $id)
List of all the languages available for a page |
|
| EloquentCollection[PageVersions] |
getPageVersions(integer $pageId, null $selectedPageVersionId = null)
Get the versions of a page |
|
| Collection |
getRouteList()
Get the route list for all the non admin pages |
|
| PageVersion |
getLivePageVersion($page)
Gets the live version of this page |
|
| PageVersion |
getPageVersionByName(Page $page, string $versionName)
Gets the page version by name |
|
| array |
getPagesList(boolean $includeAdmin = false, string $search = null)
Gets a list of pages in array format probably used for drop down boxes. |
|
| array |
availableViewsList()
Get the list of available views |
Details
at line 43
public
__construct(DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, LanguageDetector $LanguageDetector, CollectionsRepository $CollectionsRepository, $Input = null, $Config = null, $URL = null, $File = null)
Create a new PageRepostiry instance.
at line 67
public Page
find(int $id, string $versionName = 'Default', bool $editing = false)
finds a record by it's id
at line 90
public Page
findByRouteName($name $name, string $versionName = null, bool $editing = false)
finds a record by it's slug
at line 114
public DvsPage
findByRouteNameAndPreviewHash(string $name, string $previewHash)
Finds the DvsPage by a route name and preview hash
at line 146
public Page
findLocalizedPage(Page $page)
See if a localized version of this page exists if there is no difference we return null
at line 161
public Page
pages()
Finds lots of pages in the system that are not admin pages and belong to the current language
at line 178
public array
availableLanguagesForPage(integer $id)
List of all the languages available for a page
at line 219
public EloquentCollection[PageVersions]
getPageVersions(integer $pageId, null $selectedPageVersionId = null)
Get the versions of a page
at line 242
public Collection
getRouteList()
Get the route list for all the non admin pages
at line 271
public PageVersion
getLivePageVersion($page)
Gets the live version of this page
at line 295
public PageVersion
getPageVersionByName(Page $page, string $versionName)
Gets the page version by name
at line 308
public array
getPagesList(boolean $includeAdmin = false, string $search = null)
Gets a list of pages in array format probably used for drop down boxes.
at line 335
public array
availableViewsList()
Get the list of available views