Method | Description | Returns |
---|---|---|
getName() | Get the name of the active revision of the record | string |
getLayout() | Get the layout for the record revision. Since custom entity records use a layout defined on the definition level, this returns the same layout for all records of the definition. | Layout |
getOriginalPath() | Get the original path for the record without any custom urls applied | string |
getFullSlug() | Get the slug of the record, including the slugs of parent records | string |
getFullPath() | Get the full path including the custom entity index | string |
getUrl() | Get the url or path for the record. If the record 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 |
getAllRelationships() | Get all relationships this record has, sorted by relationship definition position. One entry per definition. Also returns empty relationships for definitions where no record was linked. | Collection |
getAssignedWorkflow() | Get the workflow assigned to the record or entity | Workflow |
hasAssignedWorkflow() | Check whether the record has an assigned workflow | bool |
getBranches() | Get the branches associated with the record | Collection |
getBranchRevisions(RevisionBranch $branch) | Get the revisions for the provided branch | Collection |
getNumRevisionsWithoutBranch() | Get the number of revisions without branch | int |
getRevisionsWithoutBranch() | Get all revisions without branch | Collection |
getId() | int | |
getSlug() | string | |
getPosition() | int | |
getCreated() | Date the record was created. | DateTime |
getModified() | Last modification date for the record. | DateTime |
getPublished() | DateTime | |
getDefinition() | Definition | |
getActiveRevision() | RecordRevision | |
getParent() | Record | |
getChildren() | Collection (Record) | |
getLanguage() | Language | |
getSite() | Site | |
isPublished() | Determines if the record is published. | bool |
getRevisions() | Collection (RecordRevision) | |
getRelationships() | Collection (Relationship) | |
getInverseRelationships() | Collection (Relationship) | |
getTags() | Tags associated with the page | Collection (Tag) |
getCategories() | Categories associated with the page | Collection (Category) |
getRevisionById(int $id) | RecordRevision | |
getLastRevision() | RecordRevision | |
getFullPosition() | Get the full position for this record. Returns a flat position if the definition of the custom entity is not positioned. | string |
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 |
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 |
isVersionedModel() | Check whether a model is versioned | bool |
getEntityIdentifier() | Get the entity definition's identifier for this record | string |
getRecordTemplate() | Get the template for the record if one was defined, or null | string |
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 |
getAreaHtml(string $areaName) | Get the rendered HTML for the component area with the specified name, using the active revision of the record. Adds live preview tags, if enabled. | string |
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 |
CustomEntities\Models\Frontend\Record
Record