Stack
class Stack extends Page implements ExportableInterface (View source)
Class Stack.
\@package Concrete\Core\Page\Stack
Traits
Constants
ST_TYPE_USER_ADDED |
|
ST_TYPE_GLOBAL_AREA |
|
MULTILINGUAL_CONTENT_SOURCE_CURRENT |
|
MULTILINGUAL_CONTENT_SOURCE_DEFAULT |
|
Properties
protected | $controller | from Page | |
protected | $blocksAliasedFromMasterCollection | from Page | |
protected | $cPointerOriginalID | from Page | |
protected | $cPointerExternalLink | from Page | |
protected | $cPointerExternalLinkNewWindow | from Page | |
protected | $isMasterCollection | from Page | |
protected | $cInheritPermissionsFromCID | from Page | |
protected | $cIsSystemPage | from Page | |
protected | $siteTreeID | from Page | |
$siteTree | from Page | ||
private | $multilingualSectionID |
Methods
No description
No description
Return a representation of the Page object as something easily serializable.
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).
Uses a Request object to determine which page to load. queries by path and then by cID.
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).
No description
Adds a non-canonical page path to the current page.
Sets the canonical page path for a page.
Check if a block is an alias from a page default.
Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).
Returns if the alias opens in a new window.
Get the Parent cID from a page by using a cID.
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.
Given the current page's template and page type, we return the master page.
Returns the first child of the current page, or null if there is no child.
No description
No description
No description
No description
Get the ID of the homepage for the site tree this page belongs to.
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.
Looks at the current page. If the site tree ID is 0, sets system page to true.
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
No description
No description
No description
Returns the ID of the multilingual section associated to this stack (or 0 if it's the language-neutral version).
Returns the multilingual section associated to this stack (or null if it's the language-neutral version).
Returns the collection ID of the locale.neutral version of this stack (or null if this instance is already the neutral version).
Checks if this instance is the locale-neutral version of the stack.
Returns the locale-neutral version of this stack (or null if this instance is already the neutral version).
Returns the localized version of this stack.
Details
assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)
No description
static Page
getByPath(string $path, string $version = 'RECENT', TreeInterface $siteTree = null)
No description
in
Page at line 109
CategoryInterface
getObjectAttributeCategory()
No description
static Page
getByID(int $cID, string $cvID = 'RECENT')
No description
in
Page at line 143
__construct()
No description
ItemInterface
getExporter()
No description
in
Page at line 153
protected
populatePage($cInfo, $where, $cvID)
No description
in
Page at line 208
getPermissionResponseClassName()
No description
in
Page at line 213
getPermissionAssignmentClassName()
No description
in
Page at line 218
getPermissionObjectKeyCategoryHandle()
No description
in
Page at line 226
getJSONObject()
Return a representation of the Page object as something easily serializable.
in
Page at line 242
PageController
getPageController()
No description
in
Page at line 274
getPermissionObjectIdentifier()
No description
in
Page at line 292
bool
isEditMode()
Is the page in edit mode.
in
Page at line 309
int
getPackageID()
Get the package ID for a page (page thats added by a package) (returns 0 if its not in a package).
in
Page at line 319
string
getPackageHandle()
Get the package handle for a page (page thats added by a package).
in
Page at line 333
bool
isArrangeMode()
Returns 1 if the page is in arrange mode.
in
Page at line 341
forceCheckIn()
Forces the page to be checked in if its checked out.
in
Page at line 354
static private
forceCheckInForAllPages()
No description
in
Page at line 366
bool
isAdminArea()
Checks if the page is a dashboard page, returns true if it is.
in
Page at line 381
static
getFromRequest(Request $request)
Uses a Request object to determine which page to load. queries by path and then by cID.
in
Page at line 443
processArrangement($area_id, $moved_block_id, $block_order)
No description
in
Page at line 476
bool
isCheckedOut()
checks if the page is checked out, if it is return true.
in
Page at line 516
getCollectionCheckedOutUserName()
Gets the user that is editing the current page.
$return string $name.
in
Page at line 537
bool
isCheckedOutByMe()
Checks if the page is checked out by the current user.
in
Page at line 549
bool
isGeneratedCollection()
Checks if the page is a single page.
in
Page at line 555
setPermissionsToOverride()
No description
in
Page at line 562
setChildPermissionsToOverride()
No description
in
Page at line 569
removePermissions($userOrGroup, $permissions = [])
No description
in
Page at line 600
static
getDraftsParentPage(Site $site = null)
No description
in
Page at line 608
static
getDrafts(Site $site)
No description
in
Page at line 624
isPageDraft()
No description
in
Page at line 633
static private
translatePermissionsXMLToKeys($node)
No description
in
Page at line 664
setController($controller)
No description
in
Page at line 672
getController()
deprecated
deprecated
No description
in
Page at line 680
private
assignPermissionSet($px)
No description
in
Page at line 716
int
addCollectionAlias(Collection $c)
Make an alias to a page.
in
Page at line 770
updateCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Update the name, link, and to open in a new window for an external link.
in
Page at line 794
int
addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Add a new external link.
in
Page at line 848
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.
in
Page at line 858
string
getCollectionIcon()
Gets the icon for a page (also fires the on_page_get_icon event).
in
Page at line 903
int
removeThisAlias()
Remove an external link/alias.
in
Page at line 932
populateRecursivePages($pages, $pageRow, $cParentID, $level, $includeThisPage = true)
No description
in
Page at line 956
queueForDeletionSort($a, $b)
No description
in
Page at line 968
queueForDuplicationSort($a, $b)
No description
in
Page at line 992
queueForDeletion()
No description
in
Page at line 1010
queueForDeletionRequest($queue = null, $includeThisPage = true)
No description
in
Page at line 1025
queueForDuplication($destination, $includeParent = true)
No description
in
Page at line 1042
export($pageNode)
deprecated
deprecated
No description
in
Page at line 1053
int
getCollectionCheckedOutUserID()
Returns the uID for a page that is checked out.
in
Page at line 1063
string
getCollectionPath()
Returns the path for the current page.
in
Page at line 1071
getCollectionPathObject()
Returns the PagePath object for the current page.
in
Page at line 1085
addAdditionalPagePath($cPath, $commit = true)
Adds a non-canonical page path to the current page.
in
Page at line 1102
setCanonicalPagePath($cPath, $isAutoGenerated = false)
Sets the canonical page path for a page.
in
Page at line 1119
getPagePaths()
No description
in
Page at line 1128
getAdditionalPagePaths()
No description
in
Page at line 1140
clearPagePaths()
Clears all page paths for a page.
in
Page at line 1155
string
getCollectionLink($appendBaseURL = false)
Returns full url for the current page.
in
Page at line 1160
int|null
getSiteTreeID()
No description
in
Page at line 1165
Site
getSite()
No description
in
Page at line 1178
Tree|null
getSiteTreeObject()
No description
in
Page at line 1194
static string
getCollectionPathFromID($cID)
Returns the path for a page from its cID.
in
Page at line 1207
int
getCollectionUserID()
Returns the uID for a page ownder.
in
Page at line 1217
string
getCollectionHandle()
Returns the page's handle.
in
Page at line 1225
getCollectionTypeName()
deprecated
deprecated
No description
in
Page at line 1230
getPageTypeName()
No description
in
Page at line 1243
getCollectionTypeID()
deprecated
deprecated
No description
in
Page at line 1253
int
getPageTypeID()
Returns the Collection Type ID.
in
Page at line 1258
getPageTypeObject()
No description
in
Page at line 1268
int
getPageTemplateID()
Returns the Page Template ID.
in
Page at line 1278
PageTemplate
getPageTemplateObject()
Returns the Page Template Object.
in
Page at line 1288
string
getPageTemplateHandle()
Returns the Page Template handle.
in
Page at line 1303
string
getPageTypeHandle()
Returns the Collection Type handle.
in
Page at line 1319
getCollectionTypeHandle()
No description
in
Page at line 1329
int|null
getCollectionThemeID()
Returns theme id for the collection.
in
Page at line 1344
bool
isBlockAliasedFromMasterCollection(Block $b)
Check if a block is an alias from a page default.
in
Page at line 1374
Theme
getCollectionThemeObject()
Returns Collection's theme object.
in
Page at line 1408
string
getCollectionName()
Returns the page's name.
in
Page at line 1422
int
getCollectionPointerID()
Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).
in
Page at line 1432
string
getCollectionPointerExternalLink()
Returns link for the aliased page.
in
Page at line 1442
bool
openCollectionPointerExternalLinkInNewWindow()
Returns if the alias opens in a new window.
in
Page at line 1452
bool
isAlias()
Checks to see if the page is an alias.
in
Page at line 1462
bool
isExternalLink()
Checks if a page is an external link.
in
Page at line 1472
int
getCollectionPointerOriginalID()
Get the original cID of a page.
in
Page at line 1482
string
getCollectionFilename()
Get the file name of a page (single pages).
in
Page at line 1492
string
getCollectionDatePublic()
Gets the date a the current version was made public,.
in
Page at line 1500
DateTime|null
getCollectionDatePublicObject()
No description
in
Page at line 1510
string
getCollectionDescription()
Get the description of a page.
in
Page at line 1520
int
getCollectionParentID()
Gets the cID of the page's parent.
in
Page at line 1534
static int
getCollectionParentIDFromChildID(int $cID)
Get the Parent cID from a page by using a cID.
in
Page at line 1548
array
getCollectionParentIDs()
Returns an array of this cParentID and aliased parentIDs.
in
Page at line 1565
bool
isMasterCollection()
Checks if a page is a page default.
in
Page at line 1575
string
overrideTemplatePermissions()
Gets the template permissions.
in
Page at line 1585
int
getCollectionDisplayOrder()
Gets the position of the page in the sitemap.
in
Page at line 1595
setTheme(PageTheme $pl)
Set the theme for a page using the page object.
in
Page at line 1606
setPageType(Type $type = null)
Set the theme for a page using the page object.
in
Page at line 1620
setPermissionsInheritanceToTemplate()
Set the permissions of sub-collections added beneath this permissions to inherit from the template.
in
Page at line 1631
setPermissionsInheritanceToOverride()
Set the permissions of sub-collections added beneath this permissions to inherit from the parent.
in
Page at line 1639
getPermissionsCollectionID()
No description
in
Page at line 1644
getCollectionInheritance()
No description
in
Page at line 1649
getParentPermissionsCollectionID()
No description
in
Page at line 1664
getPermissionsCollectionObject()
No description
in
Page at line 1672
getMasterCollectionID()
Given the current page's template and page type, we return the master page.
in
Page at line 1687
getOriginalCollectionID()
No description
in
Page at line 1695
getNumChildren()
No description
in
Page at line 1700
getNumChildrenDirect()
No description
in
Page at line 1720
Page
getFirstChild(string $sortColumn = 'cDisplayOrder asc')
Returns the first child of the current page, or null if there is no child.
in
Page at line 1731
getCollectionChildrenArray($oneLevelOnly = 0)
No description
in
Page at line 1742
getCollectionChildren()
Returns the immediate children of the current page.
in
Page at line 1760
protected
_getNumChildren($cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc')
No description
in
Page at line 1777
canMoveCopyTo($cobj)
No description
in
Page at line 1786
updateCollectionName($name)
No description
in
Page at line 1809
hasPageThemeCustomizations()
No description
in
Page at line 1818
resetCustomThemeStyles()
No description
in
Page at line 1825
setCustomStyleObject(Theme $pt, ValueList $valueList, $selectedPreset = false, CustomCssRecord $customCssRecord = null)
No description
in
Page at line 1858
getPageWrapperClass()
No description
in
Page at line 1880
writePageThemeCustomizations()
No description
in
Page at line 1901
static
resetAllCustomStyles()
No description
update($data)
No description
in
Page at line 2063
clearPagePermissions()
No description
in
Page at line 2070
inheritPermissionsFromParent()
No description
in
Page at line 2084
inheritPermissionsFromDefaults()
No description
in
Page at line 2104
setPermissionsToManualOverride()
No description
in
Page at line 2122
rescanAreaPermissions()
No description
in
Page at line 2132
setOverrideTemplatePermissions($cOverrideTemplatePermissions)
No description
in
Page at line 2141
updatePermissionsCollectionID($cParentIDString, $npID)
No description
in
Page at line 2160
acquireAreaPermissions($permissionsCollectionID)
No description
in
Page at line 2189
acquirePagePermissions($permissionsCollectionID)
No description
in
Page at line 2206
__destruct()
No description
in
Page at line 2211
updateGroupsSubCollection($cParentIDString)
No description
in
Page at line 2239
Block
addBlock(BlockType $bt, Area $a, array $data)
Adds a block to the page.
in
Page at line 2282
getPageRelations()
No description
in
Page at line 2299
move($nc)
No description
in
Page at line 2380
duplicateAll($nc = null, $preserveUserID = false, Site $site = null)
No description
in
Page at line 2388
protected
_duplicateAll($cParent, $cNewParent, $preserveUserID = false, Site $site = null)
No description
duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)
No description
delete()
No description
in
Page at line 2592
moveToTrash()
No description
in
Page at line 2620
rescanChildrenDisplayOrder()
No description
in
Page at line 2636
isHomePage()
No description
in
Page at line 2646
int|null
getSiteHomePageID()
Get the ID of the homepage for the site tree this page belongs to.
in
Page at line 2656
bool
isLocaleHomePage()
Is this page the homepage of a site tree?
in
Page at line 2668
static int|null
getHomePageID(Page|int $page = null)
Get the ID of the home page.
in
Page at line 2692
getAutoGeneratedPagePathObject()
No description
in
Page at line 2703
getNextSubPageDisplayOrder()
No description
in
Page at line 2714
generatePagePath()
Returns the URL-slug-based path to the current page (including any suffixes) in a string format. Does so in real time.
in
Page at line 2758
rescanCollectionPath()
Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.
.
in
Page at line 2788
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.
in
Page at line 2815
updateDisplayOrder($do, $cID = 0)
No description
in
Page at line 2825
movePageDisplayOrderToTop()
No description
in
Page at line 2841
movePageDisplayOrderToBottom()
No description
in
Page at line 2851
movePageDisplayOrderToSibling(Page $c, $position = 'before')
No description
in
Page at line 2880
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.
in
Page at line 2915
isInTrash()
No description
in
Page at line 2920
moveToRoot()
No description
in
Page at line 2928
deactivate()
No description
in
Page at line 2934
setPageToDraft()
No description
in
Page at line 2941
activate()
No description
in
Page at line 2947
isActive()
No description
in
Page at line 2952
setPageIndexScore($score)
No description
in
Page at line 2957
getPageIndexScore()
No description
in
Page at line 2962
getPageIndexContent()
No description
in
Page at line 2969
protected
_associateMasterCollectionBlocks($newCID, $masterCID, $cAcquireComposerOutputControls)
No description
in
Page at line 3004
protected
_associateMasterCollectionAttributes($newCID, $masterCID)
No description
in
Page at line 3023
static page
addHomePage(TreeInterface $siteTree = null)
Adds the home page to the system. Typically used only by the installation program.
in
Page at line 3066
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.
in
Page at line 3214
protected
acquireAreaStylesFromDefaults(Template $template)
No description
in
Page at line 3241
getCustomStyleObject()
No description
in
Page at line 3256
getCollectionFullPageCaching()
No description
in
Page at line 3261
getCollectionFullPageCachingLifetime()
No description
in
Page at line 3266
getCollectionFullPageCachingLifetimeCustomValue()
No description
in
Page at line 3271
getCollectionFullPageCachingLifetimeValue()
No description
in
Page at line 3297
static
addStatic($data, TreeInterface $parent = null)
No description
in
Page at line 3354
static
getCurrentPage()
No description
in
Page at line 3362
getPageDraftTargetParentPageID()
No description
in
Page at line 3369
setPageDraftTargetParentPageID($cParentID)
No description
static int
mapImportTextToType(string $type)
No description
static Stack
getOrCreateGlobalArea($stackName)
No description
static Page
getByName(string $stackName, string $cvID = 'RECENT', TreeInterface $site = null, int $multilingualContentSource = self::MULTILINGUAL_CONTENT_SOURCE_CURRENT)
No description
static protected bool
isValidStack(Stack $stack)
No description
static private
addStackToCategory(Page $parent, $name, $type = 0)
No description
static protected
getMultilingualSectionFromType($type)
No description
static
addGlobalArea($area)
No description
static
addStack($stack, Folder $folder = null)
No description
int
getStackType()
No description
string
getStackName()
No description
bool
display()
No description
bool|string
getStackTypeExportText()
No description
protected int
getMultilingualSectionID()
Returns the ID of the multilingual section associated to this stack (or 0 if it's the language-neutral version).
Section|null
getMultilingualSection()
Returns the multilingual section associated to this stack (or null if it's the language-neutral version).
protected int|null
getNeutralStackID()
Returns the collection ID of the locale.neutral version of this stack (or null if this instance is already the neutral version).
bool
isNeutralStack()
Checks if this instance is the locale-neutral version of the stack.
Stack|null
getNeutralStack(string|int $cvID = 'RECENT')
Returns the locale-neutral version of this stack (or null if this instance is already the neutral version).
Stack|null
getLocalizedStack(Section $section, string|int $cvID = 'RECENT')
Returns the localized version of this stack.