Page
class Page extends Collection implements ObjectInterface, AssignableObjectInterface, TreeInterface, SiteAggregateInterface (View source)
The page object in Concrete encapsulates all the functionality used by a typical page and their contents including blocks, page metadata, page permissions.
Traits
Properties
protected | $controller | ||
protected | $blocksAliasedFromMasterCollection | ||
protected | $cPointerOriginalID | ||
protected | $cPointerExternalLink | ||
protected | $cPointerExternalLinkNewWindow | ||
protected | $isMasterCollection | ||
protected | $cInheritPermissionsFromCID | ||
protected | $cIsSystemPage | ||
protected | $siteTreeID | ||
$siteTree |
Methods
No description
No description
No description
No description
No description
No description
Return a representation of the Page object as something easily serializable.
No description
No description
Is the page in edit mode.
Get the package ID for a page (page thats added by a package) (returns 0 if its not in a package).
Get the package handle for a page (page thats added by a package).
Returns 1 if the page is in arrange mode.
Forces the page to be checked in if its checked out.
Checks if the page is a dashboard page, returns true if it is.
Uses a Request object to determine which page to load. queries by path and then by cID.
No description
checks if the page is checked out, if it is return true.
Gets the user that is editing the current page.
Checks if the page is checked out by the current user.
Checks if the page is a single page.
No description
No description
No description
No description
No description
No description
No description
Make an alias to a page.
Update the name, link, and to open in a new window for an external link.
Add a new external link.
Returns true if a page is a system page. A system page is either a page that is outside the site tree (has a site tree ID of 0) or a page that is in the site tree, but whose parent starts at 0. That means its a root level page. Why do we need this separate boolean then? Because we need to easily be able to filter all pages by whether they're a system page even if we don't necessarily know where their starting page is.
Gets the icon for a page (also fires the on_page_get_icon event).
Remove an external link/alias.
No description
No description
No description
No description
No description
No description
No description
Returns the uID for a page that is checked out.
Returns the path for the current page.
Returns the PagePath object for the current page.
Adds a non-canonical page path to the current page.
Sets the canonical page path for a page.
No description
No description
Clears all page paths for a page.
Returns full url for the current page.
No description
No description
Returns the path for a page from its cID.
Returns the uID for a page ownder.
Returns the page's handle.
No description
Returns the Collection Type ID.
No description
Returns the Page Template ID.
Returns the Page Template Object.
Returns the Page Template handle.
Returns the Collection Type handle.
No description
Returns theme id for the collection.
Check if a block is an alias from a page default.
Returns Collection's theme object.
Returns the page's name.
Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).
Returns link for the aliased page.
Returns if the alias opens in a new window.
Checks to see if the page is an alias.
Checks if a page is an external link.
Get the original cID of a page.
Get the file name of a page (single pages).
Gets the date a the current version was made public,.
No description
Get the description of a page.
Gets the cID of the page's parent.
Get the Parent cID from a page by using a cID.
Returns an array of this cParentID and aliased parentIDs.
Checks if a page is a page default.
Gets the template permissions.
Gets the position of the page in the sitemap.
Set the theme for a page using the page object.
Set the permissions of sub-collections added beneath this permissions to inherit from the template.
Set the permissions of sub-collections added beneath this permissions to inherit from the parent.
No description
No description
No description
No description
Given the current page's template and page type, we return the master page.
No description
No description
No description
Returns the first child of the current page, or null if there is no child.
No description
Returns the immediate children of the current page.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Returns the URL-slug-based path to the current page (including any suffixes) in a string format. Does so in real time.
Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.
For the curret page, return the text that will be used for that pages canonical path. This happens before any uniqueness checks get run.
No description
No description
No description
Looks at the current page. If the site tree ID is 0, sets system page to true.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Adds the home page to the system. Typically used only by the installation program.
Adds a new page of a certain type, using a passed associate array to setup value. $data may contain any or all of the following: "uID": User ID of the page's owner "pkgID": Package ID the page belongs to "cName": The name of the page "cHandle": The handle of the page as used in the path "cDatePublic": The date assigned to the page.
No description
No description
No description
No description
No description
No description
Returns the total number of page views for a specific page.
No description
No description
Gets a pages statistics.
Details
assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)
No description
static Page
getByPath(string $path, string $version = 'RECENT', TreeInterface $tree = null)
No description
static Page
getByID(int $cID, string $version = 'RECENT')
No description
__construct()
No description
protected
populatePage($cInfo, $where, $cvID)
No description
getPermissionResponseClassName()
No description
getPermissionAssignmentClassName()
No description
getPermissionObjectKeyCategoryHandle()
No description
getJSONObject()
Return a representation of the Page object as something easily serializable.
PageController
getPageController()
No description
getPermissionObjectIdentifier()
No description
bool
isEditMode()
Is the page in edit mode.
int
getPackageID()
Get the package ID for a page (page thats added by a package) (returns 0 if its not in a package).
string
getPackageHandle()
Get the package handle for a page (page thats added by a package).
bool
isArrangeMode()
Returns 1 if the page is in arrange mode.
forceCheckIn()
Forces the page to be checked in if its checked out.
bool
isAdminArea()
Checks if the page is a dashboard page, returns true if it is.
static
getFromRequest(Request $request)
Uses a Request object to determine which page to load. queries by path and then by cID.
processArrangement($area_id, $moved_block_id, $block_order)
No description
bool
isCheckedOut()
checks if the page is checked out, if it is return true.
getCollectionCheckedOutUserName()
Gets the user that is editing the current page.
$return string $name.
bool
isCheckedOutByMe()
Checks if the page is checked out by the current user.
bool
isGeneratedCollection()
Checks if the page is a single page.
setPermissionsToOverride()
No description
setChildPermissionsToOverride()
No description
removePermissions($userOrGroup, $permissions = [])
No description
static
getDrafts(Site $site)
No description
isPageDraft()
No description
static private
translatePermissionsXMLToKeys($node)
No description
setController($controller)
No description
getController()
deprecated
deprecated
No description
private
assignPermissionSet($px)
No description
int
addCollectionAlias(Collection $c)
Make an alias to a page.
updateCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Update the name, link, and to open in a new window for an external link.
int
addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Add a new external link.
bool
isSystemPage()
Returns true if a page is a system page. A system page is either a page that is outside the site tree (has a site tree ID of 0) or a page that is in the site tree, but whose parent starts at 0. That means its a root level page. Why do we need this separate boolean then? Because we need to easily be able to filter all pages by whether they're a system page even if we don't necessarily know where their starting page is.
string
getCollectionIcon()
Gets the icon for a page (also fires the on_page_get_icon event).
int
removeThisAlias()
Remove an external link/alias.
populateRecursivePages($pages, $pageRow, $cParentID, $level, $includeThisPage = true)
No description
queueForDeletionSort($a, $b)
No description
queueForDuplicationSort($a, $b)
No description
queueForDeletion()
No description
queueForDeletionRequest($queue = null, $includeThisPage = true)
No description
queueForDuplication($destination, $includeParent = true)
No description
export($pageNode, $includePublicDate = true)
No description
int
getCollectionCheckedOutUserID()
Returns the uID for a page that is checked out.
string
getCollectionPath()
Returns the path for the current page.
getCollectionPathObject()
Returns the PagePath object for the current page.
addAdditionalPagePath($cPath, $commit = true)
Adds a non-canonical page path to the current page.
setCanonicalPagePath($cPath, $isAutoGenerated = false)
Sets the canonical page path for a page.
getPagePaths()
No description
getAdditionalPagePaths()
No description
clearPagePaths()
Clears all page paths for a page.
string
getCollectionLink($appendBaseURL = false)
Returns full url for the current page.
getSiteTreeID()
No description
Site
getSite()
No description
Tree
getSiteTreeObject()
No description
static string
getCollectionPathFromID($cID)
Returns the path for a page from its cID.
int
getCollectionUserID()
Returns the uID for a page ownder.
string
getCollectionHandle()
Returns the page's handle.
getCollectionTypeName()
deprecated
deprecated
No description
getPageTypeName()
No description
getCollectionTypeID()
deprecated
deprecated
No description
int
getPageTypeID()
Returns the Collection Type ID.
getPageTypeObject()
No description
int
getPageTemplateID()
Returns the Page Template ID.
PageTemplate
getPageTemplateObject()
Returns the Page Template Object.
string
getPageTemplateHandle()
Returns the Page Template handle.
string
getPageTypeHandle()
Returns the Collection Type handle.
getCollectionTypeHandle()
No description
int
getCollectionThemeID()
Returns theme id for the collection.
bool
isBlockAliasedFromMasterCollection(Block $b)
Check if a block is an alias from a page default.
Theme
getCollectionThemeObject()
Returns Collection's theme object.
string
getCollectionName()
Returns the page's name.
int
getCollectionPointerID()
Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).
string
getCollectionPointerExternalLink()
Returns link for the aliased page.
bool
openCollectionPointerExternalLinkInNewWindow()
Returns if the alias opens in a new window.
bool
isAlias()
Checks to see if the page is an alias.
bool
isExternalLink()
Checks if a page is an external link.
int
getCollectionPointerOriginalID()
Get the original cID of a page.
string
getCollectionFilename()
Get the file name of a page (single pages).
string
getCollectionDatePublic()
Gets the date a the current version was made public,.
DateTime|null
getCollectionDatePublicObject()
No description
string
getCollectionDescription()
Get the description of a page.
int
getCollectionParentID()
Gets the cID of the page's parent.
static int
getCollectionParentIDFromChildID(int $cID)
Get the Parent cID from a page by using a cID.
array
getCollectionParentIDs()
Returns an array of this cParentID and aliased parentIDs.
bool
isMasterCollection()
Checks if a page is a page default.
string
overrideTemplatePermissions()
Gets the template permissions.
int
getCollectionDisplayOrder()
Gets the position of the page in the sitemap.
setTheme(PageTheme $pl)
Set the theme for a page using the page object.
setPageType(Type $type = null)
Set the theme for a page using the page object.
setPermissionsInheritanceToTemplate()
Set the permissions of sub-collections added beneath this permissions to inherit from the template.
setPermissionsInheritanceToOverride()
Set the permissions of sub-collections added beneath this permissions to inherit from the parent.
getPermissionsCollectionID()
No description
getCollectionInheritance()
No description
getParentPermissionsCollectionID()
No description
getPermissionsCollectionObject()
No description
getMasterCollectionID()
Given the current page's template and page type, we return the master page.
getOriginalCollectionID()
No description
getNumChildren()
No description
getNumChildrenDirect()
No description
Page
getFirstChild(string $sortColumn = 'cDisplayOrder asc')
Returns the first child of the current page, or null if there is no child.
getCollectionChildrenArray($oneLevelOnly = 0)
No description
getCollectionChildren()
Returns the immediate children of the current page.
protected
_getNumChildren($cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc')
No description
canMoveCopyTo($cobj)
No description
updateCollectionName($name)
No description
hasPageThemeCustomizations()
No description
resetCustomThemeStyles()
No description
setCustomStyleObject(Theme $pt, ValueList $valueList, $selectedPreset = false, CustomCssRecord $customCssRecord = null)
No description
getPageWrapperClass()
No description
writePageThemeCustomizations()
No description
static
resetAllCustomStyles()
No description
update($data)
No description
clearPagePermissions()
No description
inheritPermissionsFromParent()
No description
inheritPermissionsFromDefaults()
No description
setPermissionsToManualOverride()
No description
rescanAreaPermissions()
No description
setOverrideTemplatePermissions($cOverrideTemplatePermissions)
No description
updatePermissionsCollectionID($cParentIDString, $npID)
No description
acquireAreaPermissions($permissionsCollectionID)
No description
acquirePagePermissions($permissionsCollectionID)
No description
__destruct()
No description
updateGroupsSubCollection($cParentIDString)
No description
addBlock($bt, $a, $data)
No description
getPageRelations()
No description
move($nc)
No description
duplicateAll($nc = null, $preserveUserID = false, Site $site = null)
No description
protected
_duplicateAll($cParent, $cNewParent, $preserveUserID = false, Site $site = null)
No description
duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)
No description
delete()
No description
moveToTrash()
No description
rescanChildrenDisplayOrder()
No description
isHomePage()
No description
getSiteHomePageID()
No description
getAutoGeneratedPagePathObject()
No description
getNextSubPageDisplayOrder()
No description
generatePagePath()
Returns the URL-slug-based path to the current page (including any suffixes) in a string format. Does so in real time.
rescanCollectionPath()
Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.
.
protected string
computeCanonicalPagePath()
For the curret page, return the text that will be used for that pages canonical path. This happens before any uniqueness checks get run.
updateDisplayOrder($do, $cID = 0)
No description
movePageDisplayOrderToTop()
No description
movePageDisplayOrderToBottom()
No description
movePageDisplayOrderToSibling(Page $c, $position = 'before')
No description
rescanSystemPageStatus()
Looks at the current page. If the site tree ID is 0, sets system page to true.
If the site tree is not user, looks at where the page falls in the hierarchy. If it's inside a page at the top level that has 0 as its parent, then it is considered a system page.
isInTrash()
No description
moveToRoot()
No description
deactivate()
No description
activate()
No description
isActive()
No description
setPageIndexScore($score)
No description
getPageIndexScore()
No description
getPageIndexContent()
No description
protected
_associateMasterCollectionBlocks($newCID, $masterCID, $cAcquireComposerOutputControls)
No description
protected
_associateMasterCollectionAttributes($newCID, $masterCID)
No description
static page
addHomePage(TreeInterface $siteTree = null)
Adds the home page to the system. Typically used only by the installation program.
page
add(Type $pt, array $data, $template = false)
Adds a new page of a certain type, using a passed associate array to setup value. $data may contain any or all of the following: "uID": User ID of the page's owner "pkgID": Package ID the page belongs to "cName": The name of the page "cHandle": The handle of the page as used in the path "cDatePublic": The date assigned to the page.
protected
acquireAreaStylesFromDefaults(Template $template)
No description
getCustomStyleObject()
No description
getCollectionFullPageCaching()
No description
getCollectionFullPageCachingLifetime()
No description
getCollectionFullPageCachingLifetimeCustomValue()
No description
getCollectionFullPageCachingLifetimeValue()
No description
static
addStatic($data, TreeInterface $parent = null)
No description
static
getCurrentPage()
No description
getTotalPageViews($date = null)
Returns the total number of page views for a specific page.
getPageDraftTargetParentPageID()
No description
setPageDraftTargetParentPageID($cParentID)
No description
getPageStatistics($limit = 20)
Gets a pages statistics.