Method | Description | |
---|---|---|
__construct ( DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, |
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 |
Method | Description | |
---|---|---|
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 |
public __construct ( DvsPage $Page, DvsField $Field, DvsGlobalField $GlobalField, |
||
$Page | DvsPage | |
$Field | DvsField | |
$GlobalField | DvsGlobalField | |
$LanguageDetector | ||
$CollectionsRepository | ||
$Input | null | |
$Config | null | |
$URL | null |
public availableLanguagesForPage ( integer $id, $params = [] ) : array | ||
$id | integer | |
return | array |
public availableViewsList ( ) : array | ||
return | array |
public findByRouteName ( $name, string $versionName = null, boolean $editing = false ) : Page | ||
$name | ||
$versionName | string | |
$editing | boolean | |
return | Page |
public findByRouteNameAndPreviewHash ( string $name, string $previewHash ) : DvsPage | ||
$name | string | |
$previewHash | string | |
return | DvsPage |
public findLocalizedPage ( Page $page ) : Page | ||
$page | Page | |
return | Page |
public findPageTemplates ( [type] $page ) : [type] | ||
$page | [type] | |
return | [type] |
public findTemplateVariables ( $templates ) : [type] | ||
return | [type] |
public getLivePageVersion ( Page $page ) : PageVersion | ||
$page | Page | |
return | PageVersion |
public getLivePageVersionByAB ( [type] $page ) : [type] | ||
$page | [type] | |
return | [type] |
public getLivePageVersionByCookie ( [type] $page ) : [type] | ||
$page | [type] | |
return | [type] |
public getLivePageVersionByDate ( [type] $page ) : [type] | ||
$page | [type] | |
return | [type] |
public getLivePageVersionByDiceRoll ( [type] $page ) : [type] | ||
$page | [type] | |
return | [type] |
public getLivePageVersionById ( [type] $page, [type] $pageVersionId ) : [type] | ||
$page | [type] | |
$pageVersionId | [type] | |
return | [type] |
public getPageVersionByName ( Page $page, string $versionName ) : PageVersion | ||
$page | Page | |
$versionName | string | |
return | PageVersion |
protected getPageVersionByPreviewHash ( $page, $previewHash ) | ||
$page | ||
$previewHash |
public getPageVersions ( integer $pageId, null $selectedPageVersionId = null ) : EloquentCollection[PageVersions] | ||
$pageId | integer | |
$selectedPageVersionId | null | |
return | EloquentCollection[PageVersions] |
public getPageVersionsByAB ( [type] $page ) : [type] | ||
$page | [type] | |
return | [type] |
public getRouteList ( ) : Collection | ||
return | Collection |
public pages ( ) : Page | ||
return | Page |
protected toHumanDateFormat ( Datetime $timestamp, string $to = 'm/d/y H:i:s' ) : string | ||
$timestamp | Datetime | |
$to | string | |
return | string |
protected updateUrlsInField ( [type] $field ) : [type] | ||
$field | [type] | |
return | [type] |
protected wrapFieldsAroundPage ( Page $page, $pageVersion ) : Page | ||
$page | Page | |
$pageVersion | ||
return | Page |
protected wrapLanguagesAroundPages ( Collection $pages ) : Collection | ||
$pages | Collection | |
return | Collection |
protected wrapPageVersionStatusByAB ( [type] $version, [type] $page, [type] $liveVersions ) : [type] | ||
$version | [type] | |
$page | [type] | |
$liveVersions | [type] | |
return | [type] |
protected wrapPageVersionStatusByDate ( DvsPageVersion $version, DvsPage $page, DvsPageVersion $liveVersion ) : DvsPageVersion | ||
$version | DvsPageVersion | |
$page | DvsPage | |
$liveVersion | DvsPageVersion | |
return | DvsPageVersion |
protected wrapPageVersionStatuses ( $versions, $page ) : Collection | ||
$versions | ||
$page | ||
return | Collection |
protected wrapPageVersionStatusesByAB ( [type] $versions, [type] $page ) : [type] | ||
$versions | [type] | |
$page | [type] | |
return | [type] |
protected wrapPageVersionStatusesByDate ( [type] $versions, [type] $page ) : [type] | ||
$versions | [type] | |
$page | [type] | |
return | [type] |
protected wrapTheseCollectionsAroundThisPage ( $collections, Page $page ) : Page | ||
$collections | ||
$page | Page | |
return | Page |
protected wrapTheseFieldsAroundThisPage ( array $fields, Page $page ) : Page | ||
$fields | array | |
$page | Page | |
return | Page |