PHP 클래스 Devise\Pages\PagesRepository

파일 보기 프로젝트 열기: devisephp/cms 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, LanguageDetector $LanguageDetector, CollectionsRepository $CollectionsRepository, null $Input = null, null $Config = null, null $URL = null, $File = null, $ViewOpener = null ) Create a new PageRepostiry instance.
availableLanguagesForPage ( integer $id, $params = [] ) : array List of all the languages available for a page
availableViewsList ( ) : array Get the list of available views
find ( integer $id ) : Page finds a record by it's id
findByRouteName ( $name, string $versionName = null, boolean $editing = false ) : Page finds a record by it's slug
findByRouteNameAndPreviewHash ( string $name, string $previewHash ) : DvsPage Finds the DvsPage by a route name and preview hash
findLocalizedPage ( Page $page ) : Page See if a localized version of this page exists if there is no difference we return null
findPageTemplates ( [type] $page ) : [type] Find the page templates for this given page
findTemplateVariables ( $templates ) : [type] Find the page variables for this given page
findWithVersion ( integer $id, string $versionName = null, boolean $editing = false ) : Page finds a record by it's id and provide version and field data
getLivePageVersion ( Page $page ) : PageVersion Gets the live version of this page
getLivePageVersionByAB ( [type] $page ) : [type] Get the live page using ab testing logic. This will first search for a cookie and if no version is found it will use the dice roll. If no page version is found with this dice roll then it will resort back to using the old "dates" system.
getLivePageVersionByCookie ( [type] $page ) : [type] Checks to see if the page already has a cookie set so this user doesn't see different page versions all the time.
getLivePageVersionByDate ( [type] $page ) : [type] Gets the live version of this page by date
getLivePageVersionByDiceRoll ( [type] $page ) : [type] Gets the live page version by a dice roll
getLivePageVersionById ( [type] $page, [type] $pageVersionId ) : [type] Get the live version of this page by id
getPageVersionByName ( Page $page, string $versionName ) : PageVersion Gets the page version by name
getPageVersions ( integer $pageId, null $selectedPageVersionId = null ) : EloquentCollection[PageVersions] Get the versions of a page
getPageVersionsByAB ( [type] $page ) : [type] Gets all live page versions when we are in a A|B testing mode for a page
getPagesList ( boolean $includeAdmin = false, string $search = null ) : array Gets a list of pages in array format probably used for drop down boxes.
getRouteList ( ) : Collection Get the route list for all the non admin pages
getUnUsedLanguageList ( integer $pageId, array $languages ) : array Gets a list of languages that the page has not been translated to or originates from
pages ( ) : Page Finds lots of pages in the system that are not admin pages and belong to the current language

보호된 메소드들

메소드 설명
getPageVersionByPreviewHash ( $page, $previewHash ) * Gets the page version by a hash
toHumanDateFormat ( Datetime $timestamp, string $to = 'm/d/y H:i:s' ) : string To human date format converts this to a readable human format
updateUrlsInField ( [type] $field ) : [type] [updateUrlsInField description]
wrapFieldsAroundPage ( Page $page, $pageVersion ) : Page Wrap all fields around the page
wrapLanguagesAroundPages ( Collection $pages ) : Collection Wraps the available languages for a page
wrapPageVersionStatusByAB ( [type] $version, [type] $page, [type] $liveVersions ) : [type] Wrap the status around a single page version
wrapPageVersionStatusByDate ( DvsPageVersion $version, DvsPage $page, DvsPageVersion $liveVersion ) : DvsPageVersion Wraps the status around a single page version
wrapPageVersionStatuses ( $versions, $page ) : Collection Wraps the statues around page versions
wrapPageVersionStatusesByAB ( [type] $versions, [type] $page ) : [type] Wraps AB Page Version Statuses on all versions for the page
wrapPageVersionStatusesByDate ( [type] $versions, [type] $page ) : [type] [wrapPageVersionStatusesByDate description]
wrapTheseCollectionsAroundThisPage ( $collections, Page $page ) : Page Takes a list of collections and wraps the page with those collections so we can access them dynamically.
wrapTheseFieldsAroundThisPage ( array $fields, Page $page ) : Page Takes a list of fields and a page and puts those field values onto a page object to return

메소드 상세

__construct() 공개 메소드

Create a new PageRepostiry instance.
public __construct ( DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, LanguageDetector $LanguageDetector, CollectionsRepository $CollectionsRepository, null $Input = null, null $Config = null, null $URL = null, $File = null, $ViewOpener = null )
$Page DvsPage
$Field DvsField
$GlobalField DvsGlobalField
$LanguageDetector Devise\Languages\LanguageDetector
$CollectionsRepository Devise\Pages\Collections\CollectionsRepository
$Input null
$Config null
$URL null

availableLanguagesForPage() 공개 메소드

List of all the languages available for a page
public availableLanguagesForPage ( integer $id, $params = [] ) : array
$id integer
리턴 array

availableViewsList() 공개 메소드

Get the list of available views
public availableViewsList ( ) : array
리턴 array

find() 공개 메소드

finds a record by it's id
public find ( integer $id ) : Page
$id integer
리턴 Page

findByRouteName() 공개 메소드

finds a record by it's slug
public findByRouteName ( $name, string $versionName = null, boolean $editing = false ) : Page
$name
$versionName string
$editing boolean
리턴 Page

findByRouteNameAndPreviewHash() 공개 메소드

Finds the DvsPage by a route name and preview hash
public findByRouteNameAndPreviewHash ( string $name, string $previewHash ) : DvsPage
$name string
$previewHash string
리턴 DvsPage

findLocalizedPage() 공개 메소드

See if a localized version of this page exists if there is no difference we return null
public findLocalizedPage ( Page $page ) : Page
$page Page
리턴 Page

findPageTemplates() 공개 메소드

Find the page templates for this given page
public findPageTemplates ( [type] $page ) : [type]
$page [type]
리턴 [type]

findTemplateVariables() 공개 메소드

Find the page variables for this given page
public findTemplateVariables ( $templates ) : [type]
리턴 [type]

findWithVersion() 공개 메소드

finds a record by it's id and provide version and field data
public findWithVersion ( integer $id, string $versionName = null, boolean $editing = false ) : Page
$id integer
$versionName string
$editing boolean
리턴 Page

getLivePageVersion() 공개 메소드

Gets the live version of this page
public getLivePageVersion ( Page $page ) : PageVersion
$page Page
리턴 PageVersion

getLivePageVersionByAB() 공개 메소드

Get the live page using ab testing logic. This will first search for a cookie and if no version is found it will use the dice roll. If no page version is found with this dice roll then it will resort back to using the old "dates" system.
public getLivePageVersionByAB ( [type] $page ) : [type]
$page [type]
리턴 [type]

getLivePageVersionByCookie() 공개 메소드

..
public getLivePageVersionByCookie ( [type] $page ) : [type]
$page [type]
리턴 [type]

getLivePageVersionByDate() 공개 메소드

Gets the live version of this page by date
public getLivePageVersionByDate ( [type] $page ) : [type]
$page [type]
리턴 [type]

getLivePageVersionByDiceRoll() 공개 메소드

Gets the live page version by a dice roll
public getLivePageVersionByDiceRoll ( [type] $page ) : [type]
$page [type]
리턴 [type]

getLivePageVersionById() 공개 메소드

Get the live version of this page by id
public getLivePageVersionById ( [type] $page, [type] $pageVersionId ) : [type]
$page [type]
$pageVersionId [type]
리턴 [type]

getPageVersionByName() 공개 메소드

Gets the page version by name
public getPageVersionByName ( Page $page, string $versionName ) : PageVersion
$page Page
$versionName string
리턴 PageVersion

getPageVersionByPreviewHash() 보호된 메소드

* Gets the page version by a hash
protected getPageVersionByPreviewHash ( $page, $previewHash )
$page
$previewHash

getPageVersions() 공개 메소드

Get the versions of a page
public getPageVersions ( integer $pageId, null $selectedPageVersionId = null ) : EloquentCollection[PageVersions]
$pageId integer
$selectedPageVersionId null
리턴 EloquentCollection[PageVersions]

getPageVersionsByAB() 공개 메소드

Gets all live page versions when we are in a A|B testing mode for a page
public getPageVersionsByAB ( [type] $page ) : [type]
$page [type]
리턴 [type]

getPagesList() 공개 메소드

Gets a list of pages in array format probably used for drop down boxes.
public getPagesList ( boolean $includeAdmin = false, string $search = null ) : array
$includeAdmin boolean
$search string
리턴 array

getRouteList() 공개 메소드

Get the route list for all the non admin pages
public getRouteList ( ) : Collection
리턴 Collection

getUnUsedLanguageList() 공개 메소드

Gets a list of languages that the page has not been translated to or originates from
public getUnUsedLanguageList ( integer $pageId, array $languages ) : array
$pageId integer
$languages array
리턴 array

pages() 공개 메소드

Finds lots of pages in the system that are not admin pages and belong to the current language
public pages ( ) : Page
리턴 Page

toHumanDateFormat() 보호된 메소드

To human date format converts this to a readable human format
protected toHumanDateFormat ( Datetime $timestamp, string $to = 'm/d/y H:i:s' ) : string
$timestamp Datetime
$to string
리턴 string

updateUrlsInField() 보호된 메소드

[updateUrlsInField description]
protected updateUrlsInField ( [type] $field ) : [type]
$field [type]
리턴 [type]

wrapFieldsAroundPage() 보호된 메소드

Wrap all fields around the page
protected wrapFieldsAroundPage ( Page $page, $pageVersion ) : Page
$page Page
$pageVersion
리턴 Page

wrapLanguagesAroundPages() 보호된 메소드

Wraps the available languages for a page
protected wrapLanguagesAroundPages ( Collection $pages ) : Collection
$pages Collection
리턴 Collection

wrapPageVersionStatusByAB() 보호된 메소드

Wrap the status around a single page version
protected wrapPageVersionStatusByAB ( [type] $version, [type] $page, [type] $liveVersions ) : [type]
$version [type]
$page [type]
$liveVersions [type]
리턴 [type]

wrapPageVersionStatusByDate() 보호된 메소드

Wraps the status around a single page version
protected wrapPageVersionStatusByDate ( DvsPageVersion $version, DvsPage $page, DvsPageVersion $liveVersion ) : DvsPageVersion
$version DvsPageVersion
$page DvsPage
$liveVersion DvsPageVersion
리턴 DvsPageVersion

wrapPageVersionStatuses() 보호된 메소드

Wraps the statues around page versions
protected wrapPageVersionStatuses ( $versions, $page ) : Collection
$versions
$page
리턴 Collection

wrapPageVersionStatusesByAB() 보호된 메소드

Wraps AB Page Version Statuses on all versions for the page
protected wrapPageVersionStatusesByAB ( [type] $versions, [type] $page ) : [type]
$versions [type]
$page [type]
리턴 [type]

wrapPageVersionStatusesByDate() 보호된 메소드

[wrapPageVersionStatusesByDate description]
protected wrapPageVersionStatusesByDate ( [type] $versions, [type] $page ) : [type]
$versions [type]
$page [type]
리턴 [type]

wrapTheseCollectionsAroundThisPage() 보호된 메소드

Takes a list of collections and wraps the page with those collections so we can access them dynamically.
protected wrapTheseCollectionsAroundThisPage ( $collections, Page $page ) : Page
$collections
$page Page
리턴 Page

wrapTheseFieldsAroundThisPage() 보호된 메소드

Takes a list of fields and a page and puts those field values onto a page object to return
protected wrapTheseFieldsAroundThisPage ( array $fields, Page $page ) : Page
$fields array
$page Page
리턴 Page