Method | Description | Returns |
---|---|---|
getParent() | Get the parent for the page | Page |
getFullSlug() | Get the slug of the page, including the slugs of parent pages | string |
getFullPath() | Get the full path including the module route name | string |
getUrl() | Get the url or path for a page. If the page belongs to a different site, this is respected in the returned url. This method will return the url using the primary environment and the primary hostname independently of the current environment the requests is viewed through. | string |
getSourcePage() | The source page this page was translated from | Page |
getRelatedPages() | The pages this page has been translated to | Collection (Page) |
getSeoSettings() | The SEO settings for the page, like title, descriptions, robots and keywords | SeoSettings |
getCustomUrl() | Get the custom url used for the page. This will take precedence over the slugs of this page, parent page and the module. | CustomUrl |
getName() | Get the title of the page | string |
getOriginalPath() | Get the original path for the page without any custom urls applied | string |
getImageTargetFolderPath() | Get the target folder path for uploaded images. Images will be moved to this path after the upload has been processed. | string |
getImageSelectorStartPath() | Get the start folder for browsing images related to this record using the file manager | string |
getId() | The ID of the page | int |
getSlug() | The slug for the page, i.e. the url portion identifying the page. Does not include parent slugs or the module slug. | string |
getPublishAt() | Date at which the page will be published or has been published | DateTime |
getUnpublishAt() | Date after which the page should not be shown anymore | DateTime |
getPosition() | Position of the page in the list of pages at the same level (i.e. with the same parent) | int |
getCreated() | Date at which the page was created | DateTime |
getModified() | Date at which the page was last modified | DateTime |
getPublished() | Date at which the page was published | DateTime |
getSite() | Site associated with the page | Site |
getActiveRevision() | The active revision for the page | PageRevision |
getLastRevision() | The last revision for the page | PageRevision |
getLanguage() | The language for the page | Language |
getChildren() | Child pages, i.e. pages located underneath this page | Collection (Page) |
getRevisions() | Revisions for the page | Collection (PageRevision) |
getTags() | Tags associated with the page | Collection (Tag) |
getCategories() | Categories associated with the page | Collection (Category) |
getAdminComments() | Admin comments for the page, i.e. comments that should only be displayed to backend users | Collection (PageAdminComment) |
isPublished() | Determines if the record is published | bool |
getOwner() | The owner of the page, possibly having different access rights to the page | User |
isNewRecord() | Check if the record is a new record | bool |
isHierarchicalModel() | Check whether a model is a hierarchical model, i.e. can have children | bool |
getFullPosition() | Get the full, dot-separated full position for hierarchical records | string |
getAreaHtml(string $areaName) | Get the html for the area with the specified name | string |
getOtherLanguageVersions() | Fetch an associative array with other language versions of this page The key of the array is the language code id (e.g. "en-us") and the value is the page. | array |
hasAreaWithName(string $areaName) | Check if an area with the specified name exists for the active revision of the record | bool |
getAreaType(string $areaName) | Get the input type for the specified layout area, using the active revision of the record. Returns null if the area with the specified name could not be found. | InputType |
getAreaCategory(string $areaName) | Get the category for the specified layout area, using the active revision of the record. Returns null if the area with the specified name could not be found. | string |
getAreaEditor(string $areaName) | Get the editor for the specified layout area, using the active revision of the record. Returns null if the area with the specified name could not be found. | string |
getAreaImage(string $areaName) | Get the image for the layout area with the specified name, using the active revision of the record | Image |
getAreaImageOrPlaceholder(string $areaName, int $width, int $height) | Get the image for the component area with the specified name. Uses the active revision of the global component. If the image does not exist, get a placeholder image with the specified dimensions Will always return an image, even if it was not found (in that case, an empty image). | Image |
getAreaFile(string $areaName) | Get the file for the layout area with the specified name, using the active revision of the record | File |
getAreaRecord(string $areaName) | Get the record for the layout area with the specified name, using the active revision of the record | Model |
getAreaRecords(string $areaName) | Get the records for the layout area with the specified name, using the active revision of the record | Collection |
getAreaText(string $areaName) | Get the text for the layout area with the specified name, using the active revision of the record | string |
getAreaValues(string $areaName) | Get the values for the layout area with the specified name, using the active revision of the record | array |
getAreaDate(string $areaName) | Get a date for the layout area with the specified name, using the active revision of the record | DateTime |
getAreaWidget(string $areaName) | Get the widget for the layout area with the specified name, using the active revision of the record | Widget |
getAreaComponent(string $areaName) | Get the component for the layout area with the specified name, using the active revision of the record | Component |
getAreaCollectionElements(string $areaName) | Get the component collection elements for the layout area with the specified name, using the active revision of the record | Collection |
getAreaDefaultContent(string $areaName) | Get the default content of the layout area. Uses the active revision of the global component. Will return a BlankContent if no content was defined. | Content |
getAreaContentOrDefault(string $areaName) | Get the content of the layout area, or the default content if no content exists. Uses the active revision of the global component. If no default content exists, a BlankContent will be returned. | Content |
getAllParents() | Get all parents for the current record, ordered by root record => the closest record | Collection |
Pages\Models\Frontend\Page
Page