ModelDocumentation module

GlobalPage

A model in the Documentation module, with 35 members for templates, 28 API properties and 52 members for admin templates.

Documentation\Models\Frontend\GlobalPage Documentation\Models\Api\GlobalPage Documentation\Models\Backend\GlobalPage Also in Documentation: Comment GlobalComment GlobalCommentVote GlobalPageRevision Page PageRevision Vote
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 31

Take no arguments.

# getName()
?string
Get the name for the active revision
# getText()
?string
Get the text for the active revision
# getParents()
array
Get the parents of this page, with this page being the last element in the array
# getOriginalFullPath()
string
Gets the original path to the documentation global page without any custom URL applied, resolving the Documentation showGlobalPage route with the page's full slug
# isGlobal()
bool
Return the info that this is a global documentation page
# getCommentsCount()
int
Get the number of comments for this page.
# getAssignedWorkflow()
?Workflow
Get the workflow assigned to the record or entity
# hasAssignedWorkflow()
bool
Check whether the record has an assigned workflow
# getBranches()
Collection
Get the branches associated with the record
# getNumRevisionsWithoutBranch()
int
Get the number of revisions without branch
# getOriginalPath()
string
It's an alias and deprecated! Directly use getOriginalFullPath() instead.
# getOriginalFullSlug()
string
Gets the record's own canonical slug, built from the record's data and _ignoring_ any custom URL override. Like getFullSlug() it excludes the module path, has no leading slash, and includes ancestor slugs for hierarchical records — but it always reflects the record's real slugs rather than a custom URL. For a non-hierarchical record this equals the record's own getSlug() value. This default concatenates whatever the ancestor walk supplies and does not judge the segments: an ancestor with no slug of its own contributes an empty segment rather than failing. A model whose callers need to tell an unresolvable chain apart from a valid one should either return an empty string from an override, as Products\Models\ProductDescription does, or expose a separate check alongside it, as Pages\Models\BasePage::hasResolvableSlugChain() does.
# getFullSlug()
string
Gets the slug that addresses this record relative to its module — the portion of the URL that identifies the record itself, without the module path and without a leading slash. For a hierarchical record the slug includes the slugs of all of its ancestors joined with slashes. This is the effective slug: when a custom URL is set on the record, it _takes precedence and is returned_ here. The no-leading-slash shape describes the canonical value only. A custom URL is returned verbatim, and custom URLs are stored with a leading slash, so a record that has one returns /my-custom rather than my-custom; use getOriginalFullSlug() when you need the canonical shape unconditionally.
# getFullPath()
string
Gets the relative path that addresses this record within the site, including the module path and starting with a leading slash. This is the getFullSlug() value prefixed with the route under which the module is mounted. This is the effective path: when a custom URL is set on the record, it _takes precedence and is returned_ here. Returns an empty string when the record has no custom URL and getOriginalFullPath() cannot build one, so callers must treat an empty string as "no url" rather than as a path. Rendering it into markup or handing it to a cache or route helper would otherwise point the record at whatever the site serves at its root.
# getId()
?int
# getPosition()
?int
# getSlug()
?string
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getPublished()
?DateTime
# getActiveRevision()
?GlobalPageRevision
# getParent()
?GlobalPage
# isPublished()
bool
Check if the record is published.
# getRevisions()
?Collection<lobalPageRevision>
# getLastRevision()
?GlobalPageRevision
Get the last revision for the entity. If a revision has been added, this will be the newly added revision.
# getChildren()
?Collection<lobalPage>
# getComments()
?Collection<lobalComment>
# getFullPosition()
string
Get the full, dot-separated full position for hierarchical records
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

Methods 4

Take arguments. The API serialises only getters that need none.

# getBranchRevisions(RevisionBranch $branch, ?int $limit, ?int $offset)
Collection
Get the revisions for the provided branch, ordered by id ascending. Pass a limit/offset to fetch a bounded window instead of the full set — loading all revisions of a large branch exhausts memory.
# getNumBranchRevisions(RevisionBranch $branch)
int
Get the number of revisions for the provided branch (COUNT query — does not hydrate)
# getRevisionsWithoutBranch(?int $limit, ?int $offset)
Collection
Get the revisions without branch, ordered by id ascending. Pass a limit/offset to fetch a bounded window instead of the full set — loading all revisions of a record with a large history exhausts memory.
# getRevisionById(int $id)
?GlobalPageRevision
Get the revision with the specified id

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 28

Read-only values on the record.

# name
?string
Get the name for the active revision
# text
?string
Get the text for the active revision
# parents
array
Get the parents of this page, with this page being the last element in the array
# originalFullPath
string
Gets the original path to the documentation global page without any custom URL applied, resolving the Documentation showGlobalPage route with the page's full slug
# global
bool
Return the info that this is a global documentation page
# commentsCount
int
Get the number of comments for this page.
# assignedWorkflow
?Workflow
Get the workflow assigned to the record or entity
# assignedWorkflow
bool
Check whether the record has an assigned workflow
# branches
Collection
Get the branches associated with the record
# numRevisionsWithoutBranch
int
Get the number of revisions without branch
# originalPath
string
It's an alias and deprecated! Directly use getOriginalFullPath() instead.
# originalFullSlug
string
Gets the record's own canonical slug, built from the record's data and _ignoring_ any custom URL override. Like getFullSlug() it excludes the module path, has no leading slash, and includes ancestor slugs for hierarchical records — but it always reflects the record's real slugs rather than a custom URL. For a non-hierarchical record this equals the record's own getSlug() value. This default concatenates whatever the ancestor walk supplies and does not judge the segments: an ancestor with no slug of its own contributes an empty segment rather than failing. A model whose callers need to tell an unresolvable chain apart from a valid one should either return an empty string from an override, as Products\Models\ProductDescription does, or expose a separate check alongside it, as Pages\Models\BasePage::hasResolvableSlugChain() does.
# fullSlug
string
Gets the slug that addresses this record relative to its module — the portion of the URL that identifies the record itself, without the module path and without a leading slash. For a hierarchical record the slug includes the slugs of all of its ancestors joined with slashes. This is the effective slug: when a custom URL is set on the record, it _takes precedence and is returned_ here. The no-leading-slash shape describes the canonical value only. A custom URL is returned verbatim, and custom URLs are stored with a leading slash, so a record that has one returns /my-custom rather than my-custom; use getOriginalFullSlug() when you need the canonical shape unconditionally.
# fullPath
string
Gets the relative path that addresses this record within the site, including the module path and starting with a leading slash. This is the getFullSlug() value prefixed with the route under which the module is mounted. This is the effective path: when a custom URL is set on the record, it _takes precedence and is returned_ here. Returns an empty string when the record has no custom URL and getOriginalFullPath() cannot build one, so callers must treat an empty string as "no url" rather than as a path. Rendering it into markup or handing it to a cache or route helper would otherwise point the record at whatever the site serves at its root.
# id
?int
# position
?int
# slug
?string
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# published
?DateTime
# activeRevision
?GlobalPageRevision
# parent
?GlobalPage
# published
bool
Check if the record is published.
# revisions
?Collection<lobalPageRevision>
# lastRevision
?GlobalPageRevision
Get the last revision for the entity. If a revision has been added, this will be the newly added revision.
# children
?Collection<lobalPage>
# comments
?Collection<lobalComment>
# fullPosition
string
Get the full, dot-separated full position for hierarchical records

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 45

Take no arguments.

# getName()
?string
Get the name for the active revision
# getText()
?string
Get the text for the active revision
# getParents()
array
Get the parents of this page, with this page being the last element in the array
# getOriginalFullPath()
string
Gets the original path to the documentation global page without any custom URL applied, resolving the Documentation showGlobalPage route with the page's full slug
# isGlobal()
bool
Return the info that this is a global documentation page
# getCommentsCount()
int
Get the number of comments for this page.
# getImageRootTargetFolderPath() Admin only
string
Retrieves the *root* target folder path for uploaded images. This is usually the root entity path without the ID or slug sub folder.
# getImageTargetFolderPath() Admin only
string
Retrieves the target folder path for uploaded images. Images will be moved to this path after the upload has been processed.
# isSupportingBranches() Admin only
bool
Checks whether the record supports branches
# getAssignedWorkflow()
?Workflow
Get the workflow assigned to the record or entity
# hasAssignedWorkflow()
bool
Check whether the record has an assigned workflow
# getBranches()
Collection
Get the branches associated with the record
# getNumRevisionsWithoutBranch()
int
Get the number of revisions without branch
# getOriginalPath()
string
It's an alias and deprecated! Directly use getOriginalFullPath() instead.
# getOriginalFullSlug()
string
Gets the record's own canonical slug, built from the record's data and _ignoring_ any custom URL override. Like getFullSlug() it excludes the module path, has no leading slash, and includes ancestor slugs for hierarchical records — but it always reflects the record's real slugs rather than a custom URL. For a non-hierarchical record this equals the record's own getSlug() value. This default concatenates whatever the ancestor walk supplies and does not judge the segments: an ancestor with no slug of its own contributes an empty segment rather than failing. A model whose callers need to tell an unresolvable chain apart from a valid one should either return an empty string from an override, as Products\Models\ProductDescription does, or expose a separate check alongside it, as Pages\Models\BasePage::hasResolvableSlugChain() does.
# getFullSlug()
string
Gets the slug that addresses this record relative to its module — the portion of the URL that identifies the record itself, without the module path and without a leading slash. For a hierarchical record the slug includes the slugs of all of its ancestors joined with slashes. This is the effective slug: when a custom URL is set on the record, it _takes precedence and is returned_ here. The no-leading-slash shape describes the canonical value only. A custom URL is returned verbatim, and custom URLs are stored with a leading slash, so a record that has one returns /my-custom rather than my-custom; use getOriginalFullSlug() when you need the canonical shape unconditionally.
# getFullPath()
string
Gets the relative path that addresses this record within the site, including the module path and starting with a leading slash. This is the getFullSlug() value prefixed with the route under which the module is mounted. This is the effective path: when a custom URL is set on the record, it _takes precedence and is returned_ here. Returns an empty string when the record has no custom URL and getOriginalFullPath() cannot build one, so callers must treat an empty string as "no url" rather than as a path. Rendering it into markup or handing it to a cache or route helper would otherwise point the record at whatever the site serves at its root.
# getId()
?int
# getPosition()
?int
# getSlug()
?string
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getPublished()
?DateTime
# getActiveRevision()
?GlobalPageRevision
# getParent()
?GlobalPage
# isPublished()
bool
Check if the record is published.
# getRevisions()
?Collection<lobalPageRevision>
# getLastRevision()
?GlobalPageRevision
Get the last revision for the entity. If a revision has been added, this will be the newly added revision.
# getChildren()
?Collection<lobalPage>
# getComments()
?Collection<lobalComment>
# getFullPosition()
string
Get the full, dot-separated full position for hierarchical records
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# getCreateChildUrl() Admin only
?string
Get the url for creating a child record.
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getMoveUrl() Admin only
?string
Get the url for moving the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# getPermissionsUrl() Admin only
?string
Get the url for editing the permissions of the record.
# getCheckPermissionsUrl() Admin only
?string
Get the url for checking user permissions for this record.
# getPublishUrl() Admin only
?string
Get the url for publishing the record.
# getManageUrl() Admin only
?string
Get the url for managing records.
# getDuplicateUrl() Admin only
?string
Get the url for duplicating the record.
# getAvailableSaveNewActions() Admin only
array
Get the actions available for saving a new version of the record. Determined whether an active revision can be set directly, and in which order the actions should be returned.

Methods 7

Take arguments. The API serialises only getters that need none.

# getBranchRevisions(RevisionBranch $branch, ?int $limit, ?int $offset)
Collection
Get the revisions for the provided branch, ordered by id ascending. Pass a limit/offset to fetch a bounded window instead of the full set — loading all revisions of a large branch exhausts memory.
# getNumBranchRevisions(RevisionBranch $branch)
int
Get the number of revisions for the provided branch (COUNT query — does not hydrate)
# getRevisionsWithoutBranch(?int $limit, ?int $offset)
Collection
Get the revisions without branch, ordered by id ascending. Pass a limit/offset to fetch a bounded window instead of the full set — loading all revisions of a record with a large history exhausts memory.
# getRevisionById(int $id)
?GlobalPageRevision
Get the revision with the specified id
# getAvailableSaveActions(?Model $currentRevision) Admin only
array
Get the save actions available for the record and provided revision being edited
# getRevisionActions(Revision $revision, ?Revision $currentRevision) Admin only
array
Get the actions available for the provided revision
# getUpdateRevisionId(Revision $revision) Admin only
?int
Get the revision ID to use when updating the record. If the provided revision is a draft, the previous id is returned, if one exists.