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 92
public Page
findByRouteName($name $name, string $versionName = null, bool $editing = false)
finds a record by it's slug
at line 118
public DvsPage
findByRouteNameAndPreviewHash(string $name, string $previewHash)
Finds the DvsPage by a route name and preview hash
at line 150
public Page
findLocalizedPage(Page $page)
See if a localized version of this page exists if there is no difference we return null
at line 165
public Page
pages()
Finds lots of pages in the system that are not admin pages and belong to the current language
at line 187
public array
availableLanguagesForPage(integer $id)
List of all the languages available for a page
at line 228
public EloquentCollection[PageVersions]
getPageVersions(integer $pageId, null $selectedPageVersionId = null)
Get the versions of a page
at line 251
public Collection
getRouteList()
Get the route list for all the non admin pages
at line 280
public PageVersion
getLivePageVersion($page)
Gets the live version of this page
at line 304
public PageVersion
getPageVersionByName(Page $page, string $versionName)
Gets the page version by name
at line 317
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 344
public array
availableViewsList()
Get the list of available views