Section
class Section extends Page (View source)
Traits
Properties
$error | from ConcreteObject | ||
int|null deprecated | $cID | The collection ID. |
from Collection |
protected Version|null | $vObj | The collection version object. |
from Collection |
protected string|null | $cHandle | The collection handle. |
from Collection |
protected string|null | $cDateAdded | The date/time when the collection has been created. |
from Collection |
protected string|null | $cDateModified | The date/time when the collection was last modified. |
from Collection |
protected array | $attributes | from Collection | |
Tree|null deprecated | $siteTree | from Page | |
protected PageController|null | $controller | The page controller. |
from Page |
protected int[]|null | $blocksAliasedFromMasterCollection | The list of block IDs that are alias. |
from Page |
int|null | $cCheckedOutUID | The user id of the user that has checked out the page. |
from Page |
protected int|null | $cPointerOriginalID | The original cID of a page (if it's a page alias). |
from Page |
protected int|null | $cPointerOriginalSiteTreeID | The original siteTreeID of a page (if it's a page alias). |
from Page |
protected string|null | $cPointerExternalLink | The link for the aliased page. |
from Page |
protected bool|int|null | $cPointerExternalLinkNewWindow | Should the alias link to be opened in a new window? |
from Page |
protected bool|int|null | $isMasterCollection | Is this page a page default? |
from Page |
protected int|null | $cInheritPermissionsFromCID | The ID of the page from which this page inherits permissions from. |
from Page |
protected bool | $cIsSystemPage | Is this a system page? |
from Page |
protected int|null | $siteTreeID | The site tree ID. |
from Page |
int|null deprecated | $pkgID | from Page | |
string|false|null deprecated | $pkgHandle | from Page | |
int|null deprecated | $cPointerID | from Page | |
int|bool|null deprecated | $cIsDraft | from Page | |
int|bool|null deprecated | $cIsActive | from Page | |
string|null deprecated | $cFilename | from Page | |
int|null deprecated | $ptID | from Page | |
int|null deprecated | $cDisplayOrder | from Page | |
string|null deprecated | $cInheritPermissionsFrom | from Page | |
bool|int|null deprecated | $cOverrideTemplatePermissions | from Page | |
int|bool|null deprecated | $cIsTemplate | from Page | |
int|null deprecated | $uID | from Page | |
string|null deprecated | $cPath | from Page | |
int|null deprecated | $cParentID | from Page | |
int|null deprecated | $cChildren | from Page | |
int|null deprecated | $cCacheFullPageContent | from Page | |
private string|null | $customAliasName | The custom name of the alias page. |
from Page |
private string|null | $aliasHandle | The handle of the alias page |
from Page |
protected bool|null | $hasCustomSummaryTemplateCollection | Whether this page has a custom summary template collection assigned to it. If null/false, then we just use any that are found to fit the criteria. |
from Page |
protected | $cCacheFullPageContentOverrideLifetime | from Page | |
protected | $cCacheFullPageContentLifetimeCustom | from Page | |
protected Locale | $locale |
Methods
Returns an instance of MultilingualSection for the given page ID.
Get a Collection by handle (provided that it's not a Page handle).
(Re)Index all the collections that are marked as to be (re)indexed.
Get the date/time when the collection was last modified.
Get the date/time when the collection has been created.
Create a new Collection instance, using the same theme as this instance (if it's a Page instance).
Load a specific collection version (you can retrieve it with the getVersionObject() method).
Get the Collection instance to be modified (this instance if it's a new or master Collection, a clone otherwise).
Get the automatic comment for the next collection version.
Set the attribute value for the currently loaded collection version.
Return the value of the attribute with the handle $akHandle of the currently loaded version (if it's loaded).
Return the attribute value object with the handle $akHandle of the currently loaded version (if it's loaded).
Delete the values of the attributes associated to the currently loaded collection version.
Delete the value of a specific attribute key associated to the currently loaded collection version.
Get the list of attribute keys for which the currently loaded collection version has values.
Get an existing area associated to this collection.
Does this collection contain blocks that are aliased in other pages?
Get the custom style of an area in the currently loaded collection version.
Set the custom style of an area in the currently loaded collection version.
Delete all the custom styles of an area of the currently loaded collection version.
Retrieve all custom style rules that should be inserted into the header on a page, whether they are defined in areas or blocks.
Get the blocks contained in all the global areas in this collection.
Get the IDs for blocks contained in all the global areas in this collection.
Get all the global stacks loaded in this collection.
List the blocks in the currently loaded collection version (or in a specific area within it).
List the block IDs and the associated area handles in the currently loaded collection version (or in a specific area within it).
Add a new block to a specific area of the page.
Get the next value of the display order (to be used when adding new blocks to an area).
Fix the display order properties for all the blocks within the collection/area.
Fix the display order properties for all the blocks after this block in this area.
Create a clone of this collection, and all its versions, contents and attributes.
Clone the currently loaded version and returns a Page instance containing the new version.
No description
Get a page given its path.
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).
Uses a Request object to determine which page to load. Queries by path and then by cID.
Persist the data associated to a block when it has been moved around in the page.
Remove specific permission keys for a specific access entity (user, group, group combination).
This is the legacy function that is called just by xml. We pass these values in as though they were the old ones.
Update the name, link, and to open in a new window for an external link.
Add a new external link as a child of this page.
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).
Create an array containing data about child pages.
Sort a list of pages, so that the order is correct for the deletion.
Sort a list of pages, so that the order is correct for the duplication.
Get the uID for a page that is checked out (if any).
Add a non-canonical page path to the current page.
Set the canonical page path for a page.
Get the collection ID for the aliased page (returns 0 unless used on an actual alias).
Should the alias link to be opened in a new window?
Get the original cID of a page (if it's a page alias).
Get the date/time when the current version was made public (or a falsy value if the current version doesn't have public date).
Get the date/time when the current version was made public (or NULL value if the current version doesn't have public date).
Get the parent cID of a page given its cID.
Get an array containint this cParentID and aliased parentIDs.
Get the position of the page in the sitemap, relative to its parent page.
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.
Get the ID of the page from which this page inherits permissions from.
Where permissions should be inherited from? 'PARENT' or 'TEMPLATE' or 'OVERRIDE'.
Get the ID of the page from which the parent page page inherits permissions from.
Get the page from which this page inherits permissions from.
Get the master page of this page, given its page template and page type.
Get the first child of the current page, or null if there is no child.
Get the list of child page IDs, sorted by their display order.
Get the CSS class to be used to wrap the whole page contents.
Set this page permissions to be inherited from its parent page.
Set this page permissions to be inherited from its parent type defaults.
Rescan the page areas ensuring that they are inheriting permissions properly.
Are template permissions overriden?
Set the child pages of a list of parent pages to inherit permissions from the specified page (provided that they previouly had the same inheritance page as this page).
Acquire the area permissions, copying them from the inherited ones.
Acquire the page permissions, copying them from the inherited ones.
Duplicate this page and all its child pages and return the new Page created.
Duplicate this page and return the new Page created.
Get the ID of the homepage for the site tree this page belongs to.
Get a new PagePath object with the computed canonical page path.
Get the URL-slug-based path to the current page (including any suffixes) in a string format. Does so in real time.
Recalculate the canonical page path for the current page and its sub-pages, based on its current version, URL slug, etc.
Set a new display order for this page (or for another page given its ID).
Move this page before of after another page.
Set the page index score (used by a PageList for instance).
Add the home page to the system. Typically used only by the installation program.
Get the custom style for the currently loaded page version (if any).
Get the full-page cache flag (-1: use global setting; 0: no; 1: yes - NULL if page is not loaded).
Get the full-page cache lifetime criteria ('default': use default lifetime; 'forever': no expiration; 'custom': custom lifetime value - see getCollectionFullPageCachingLifetimeCustomValue(); other: use the default lifetime - NULL if page is not loaded).
Get the full-page cache custom lifetime in minutes (to be used if getCollectionFullPageCachingLifetime() is 'custom').
Get the actual full-page cache lifespan (in seconds).
Read the data from the database.
Populate the childrenCIDArray property (called by the getCollectionChildrenArray() method).
Duplicate all the child pages of a specific page which has already have been duplicated.
Duplicate the master collection blocks/permissions to a newly created page.
Duplicate the master collection attributes to a newly created page.
No description
No description
No description
No description
No description
No description
No description
Returns the number of plural forms.
Returns the rule to determine which plural we should use (in gettext notation).
Returns the plural cases for the language; array keys are the case name, array values are some examples for that case.
No description
No description
No description
No description
No description
Gets the MultilingualSection object for the current section of the site.
No description
No description
No description
No description
No description
No description
No description
No description
Receives a page in a different language tree, and tries to return the corresponding page in the current language tree.
Loads the translations of this multilingual section.
Details
loadError($error)
No description
isError()
No description
getError()
No description
setPropertiesFromArray($arr)
No description
static
camelcase($file)
No description
static
uncamelcase($string)
No description
__destruct()
Destruct the class instance.
static Collection
getByID(int $cID, int|string $cvID = 'RECENT')
Returns an instance of MultilingualSection for the given page ID.
static Collection|null
getByHandle(string $handle)
Get a Collection by handle (provided that it's not a Page handle).
If there's there's no collection with the specified handle, a new Collection will be created.
static int
reindexPendingPages()
(Re)Index all the collections that are marked as to be (re)indexed.
static Collection
createCollection(array $data)
Create a new Collection instance.
int|null
getCollectionID()
Get the collection ID.
in
Page at line 1609
string|null
getCollectionHandle()
Get the page handle.
string|null
getCollectionDateLastModified()
Get the date/time when the collection was last modified.
string|null
getCollectionDateAdded()
Get the date/time when the collection has been created.
int
getVersionID()
Get the ID of the currently loaded version.
Version|null
getVersionObject()
Get the currently loaded version object.
Collection
addCollection(array $data)
Create a new Collection instance, using the same theme as this instance (if it's a Page instance).
loadVersionObject(string|int $cvID = 'ACTIVE')
Load a specific collection version (you can retrieve it with the getVersionObject() method).
$this|Page
getVersionToModify()
Get the Collection instance to be modified (this instance if it's a new or master Collection, a clone otherwise).
string
getNextVersionComments()
Get the automatic comment for the next collection version.
reindex()
No description
PageValue
setAttribute(string|CollectionKey $ak, AbstractValue|mixed $value, bool $doReindexImmediately = true)
Set the attribute value for the currently loaded collection version.
mixed|null
getAttribute(string|CollectionKey $akHandle, string|false $displayMode = false)
Return the value of the attribute with the handle $akHandle of the currently loaded version (if it's loaded).
PageValue|null
getAttributeValueObject(string|CollectionKey $akHandle, bool $createIfNotExists = false)
Return the attribute value object with the handle $akHandle of the currently loaded version (if it's loaded).
clearCollectionAttributes(int[] $retainAKIDs = [])
Delete the values of the attributes associated to the currently loaded collection version.
clearAttribute(string|CollectionKey $ak, bool $doReindexImmediately = true)
Delete the value of a specific attribute key associated to the currently loaded collection version.
PageKey[]
getSetCollectionAttributes()
Get the list of attribute keys for which the currently loaded collection version has values.
Area|null
getArea(string $arHandle)
Get an existing area associated to this collection.
bool
hasAliasedContent()
Does this collection contain blocks that are aliased in other pages?
CustomStyle|null
getAreaCustomStyle(Area $area, bool $force = false)
Get the custom style of an area in the currently loaded collection version.
setCustomStyleSet(Area $area, StyleSet $set)
Set the custom style of an area in the currently loaded collection version.
resetAreaCustomStyle(Area $area)
Delete all the custom styles of an area of the currently loaded collection version.
string|null
outputCustomStyleHeaderItems(bool $return = false)
Retrieve all custom style rules that should be inserted into the header on a page, whether they are defined in areas or blocks.
null|false
relateVersionEdits(Collection $oc)
Associate the edits of another collection to this collection.
in
Page at line 1655
int|false
getPageTypeID()
Get the Collection Type ID.
refreshCache()
Empty the collection-related cache.
Block[]
getGlobalBlocks()
Get the blocks contained in all the global areas in this collection.
array
getGlobalBlockIDs()
Get the IDs for blocks contained in all the global areas in this collection.
protected Stack[]
getGlobalStacksForCollection()
Get all the global stacks loaded in this collection.
Block[]
getBlocks(string|false $arHandle = false)
List the blocks in the currently loaded collection version (or in a specific area within it).
array
getBlockIDs(string|false $arHandle = false)
List the block IDs and the associated area handles in the currently loaded collection version (or in a specific area within it).
in
Page at line 2785
Block
addBlock(BlockType $bt, string|Area $a, array $data)
Add a new block to a specific area of the page.
int
getCollectionAreaDisplayOrder(string $arHandle, bool $ignoreVersions = false)
Get the next value of the display order (to be used when adding new blocks to an area).
rescanDisplayOrder(string $arHandle)
Fix the display order properties for all the blocks within the collection/area.
void
rescanDisplayOrderFromBlock(Block $block, string $arHandle, int $fromDisplay = null)
Fix the display order properties for all the blocks after this block in this area.
This is useful for forcing a certain block order.
markModified()
Update the last edit date/time.
in
Page at line 2982
delete()
Delete this page and all its child pages.
Collection
duplicateCollection()
Create a clone of this collection, and all its versions, contents and attributes.
Page
cloneVersion(string|null $versionComments, bool $createEmpty = false)
Clone the currently loaded version and returns a Page instance containing the new version.
PageValue|null
getAttributeValue(string|CollectionKey $ak)
deprecated
deprecated
No description
mixed|null
getCollectionAttributeValue(string|CollectionKey $akHandle)
deprecated
deprecated
No description
in
Page at line 1645
getCollectionTypeID()
deprecated
deprecated
No description
assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)
No description
in
Page at line 302
__construct()
Initialize collection until we populate it.
in
Page at line 316
static Page
getByPath(string $path, string $version = 'RECENT', TreeInterface $tree = null)
Get a page given its path.
in
Page at line 349
CategoryInterface
getObjectAttributeCategory()
No description
in
Page at line 393
ItemInterface
getExporter()
No description
getPermissionResponseClassName()
No description
in
Page at line 413
getPermissionAssignmentClassName()
No description
getPermissionObjectKeyCategoryHandle()
No description
in
Page at line 433
string
getSummaryCategoryHandle()
No description
in
Page at line 441
getSummaryIdentifier()
No description
in
Page at line 451
stdClass
getJSONObject()
Return a representation of the Page object as something easily serializable.
in
Page at line 478
PageController
getPageController()
Get the page controller.
in
Page at line 519
getPermissionObjectIdentifier()
No description
in
Page at line 537
bool
isEditMode()
Is the page in edit mode?
in
Page at line 554
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 564
string|null
getPackageHandle()
Get the handle the the package that added this page.
in
Page at line 578
false
isArrangeMode()
deprecated
deprecated
No description
in
Page at line 586
forceCheckIn()
Forces the page to be checked in if its checked out.
in
Page at line 598
static private
forceCheckInForAllPages()
No description
in
Page at line 610
bool
isAdminArea()
Is this a dashboard page?
in
Page at line 628
static Page
getFromRequest(Request $request)
Uses a Request object to determine which page to load. Queries by path and then by cID.
in
Page at line 697
processArrangement(int $area_id, int $moved_block_id, int[] $block_order)
Persist the data associated to a block when it has been moved around in the page.
in
Page at line 730
bool|null
isCheckedOut()
Is the page checked out?
in
Page at line 769
string
getCollectionCheckedOutUserName()
Gets the user that is editing the current page.
in
Page at line 790
bool
isCheckedOutByMe()
Checks if the page is checked out by the current user.
in
Page at line 806
bool
isGeneratedCollection()
Checks if the page is a single page.
Generated collections are collections without templates, that have special cFilename attributes .
in
Page at line 816
setPermissionsToOverride()
No description
in
Page at line 828
setChildPermissionsToOverride()
No description
in
Page at line 841
removePermissions(Group|Group[]|User|UserInfo|User $userOrGroup, string[] $permissions = [])
Remove specific permission keys for a specific access entity (user, group, group combination).
in
Page at line 879
static Page
getDraftsParentPage(Site $site = null)
Get the drafts parent page for a specific site.
in
Page at line 895
static Page[]
getDrafts(Site $site)
Get the list of draft pages in a specific site.
in
Page at line 916
bool
isPageDraft()
Is this a draft page?
in
Page at line 930
setController(PageController|null $controller)
Set the page controller.
in
Page at line 940
PageController
getController()
deprecated
deprecated
No description
in
Page at line 952
private
assignPermissionSet(SimpleXMLElement $px)
This is the legacy function that is called just by xml. We pass these values in as though they were the old ones.
in
Page at line 980
array
getSummaryTemplates()
No description
in
Page at line 991
protected CustomPageTemplateCollection
getCustomPageSummaryTemplateCollection()
No description
in
Page at line 999
bool
hasCustomSummaryTemplates()
No description
in
Page at line 1007
array
getCustomSelectedSummaryTemplates()
No description
in
Page at line 1028
int
addCollectionAlias(mixed $c)
Make an alias to a page.
in
Page at line 1086
void
updateCollectionAlias(array $data)
Update the alias details.
in
Page at line 1139
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 1163
int
addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Add a new external link as a child of this page.
in
Page at line 1216
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 1226
string
getCollectionIcon()
Gets the icon for a page (also fires the on_page_get_icon event).
in
Page at line 1271
int|null
removeThisAlias()
Remove an external link/alias.
in
Page at line 1319
array
populateRecursivePages(array $pages, array $pageRow, int $cParentID, int $level, bool $includeThisPage = true)
Create an array containing data about child pages.
in
Page at line 1351
static int
queueForDeletionSort(array $a, array $b)
Sort a list of pages, so that the order is correct for the deletion.
in
Page at line 1371
static int
queueForDuplicationSort(array $a, array $b)
Sort a list of pages, so that the order is correct for the duplication.
in
Page at line 1402
export(SimpleXMLElement $pageNode)
deprecated
deprecated
No description
in
Page at line 1413
int|null
getCollectionCheckedOutUserID()
Get the uID for a page that is checked out (if any).
in
Page at line 1423
string
getCollectionPath()
Get the path of this page.
in
Page at line 1433
PagePath|null
getCollectionPathObject()
Returns the PagePath object for the current page.
in
Page at line 1452
PagePath
addAdditionalPagePath(string $cPath, bool $commit = true)
Add a non-canonical page path to the current page.
in
Page at line 1472
setCanonicalPagePath(string $cPath, bool $isAutoGenerated = false)
Set the canonical page path for a page.
in
Page at line 1494
PagePath[]
getPagePaths()
Get all the page paths of this page.
in
Page at line 1508
PagePath[]
getAdditionalPagePaths()
Get all the non-canonical page paths of this page.
in
Page at line 1520
clearPagePaths()
Clears all page paths for a page.
in
Page at line 1535
string
getCollectionLink()
Returns full url for the current page.
in
Page at line 1545
int|null
getSiteTreeID()
No description
in
Page at line 1555
Site
getSite()
No description
in
Page at line 1568
Tree|null
getSiteTreeObject()
No description
in
Page at line 1586
static
getCollectionPathFromID(mixed $cID)
Returns the path for a page from its cID.
in
Page at line 1599
int|null
getCollectionUserID()
Get the uID of the page author (if any).
in
Page at line 1622
string|null
getCollectionTypeName()
deprecated
deprecated
No description
in
Page at line 1632
string|null
getPageTypeName()
Get the display name of the page type (if available).
in
Page at line 1665
Type|null
getPageTypeObject()
Get the page type object.
in
Page at line 1675
int
getPageTemplateID()
Get the Page Template ID.
in
Page at line 1688
Template|null
getPageTemplateObject()
Get the Page Template Object (if available).
in
Page at line 1698
string|false
getPageTemplateHandle()
Get the handle of the Page Template (if available).
in
Page at line 1713
string|false
getPageTypeHandle()
Get the handle of the Page Type (if available).
in
Page at line 1734
string|false
getCollectionTypeHandle()
deprecated
deprecated
No description
in
Page at line 1744
int|null
getCollectionThemeID()
Get the theme ID for the collection (if available).
in
Page at line 1759
bool
isBlockAliasedFromMasterCollection(Block $b)
Check if a block is an alias from a page default.
in
Page at line 1789
Theme
getCollectionThemeObject()
Get the collection's theme object.
in
Page at line 1825
string
getCollectionName()
Get the page name.
in
Page at line 1844
string|null
getCustomAliasName()
Get the custom name of the alias page.
in
Page at line 1854
string|null
getAliasHandle()
Get the handle of the alias page
in
Page at line 1864
int
getCollectionPointerID()
Get the collection ID for the aliased page (returns 0 unless used on an actual alias).
in
Page at line 1874
string|null
getCollectionPointerExternalLink()
Get the link for the aliased page.
in
Page at line 1884
bool|int|null
openCollectionPointerExternalLinkInNewWindow()
Should the alias link to be opened in a new window?
in
Page at line 1896
bool
isAliasPage()
Is this page an alias page of another page?
in
Page at line 1908
bool
isAliasPageOrExternalLink()
Is this page an alias page or an external link?
in
Page at line 1918
bool
isAlias()
deprecated
deprecated
No description
in
Page at line 1928
bool
isExternalLink()
Is this page an external link?
in
Page at line 1938
int
getCollectionPointerOriginalID()
Get the original cID of a page (if it's a page alias).
in
Page at line 1948
string
getCollectionFilename()
Get the file name of a page (single pages).
in
Page at line 1960
string
getCollectionDatePublic()
Get the date/time when the current version was made public (or a falsy value if the current version doesn't have public date).
in
Page at line 1973
DateTime|null
getCollectionDatePublicObject()
Get the date/time when the current version was made public (or NULL value if the current version doesn't have public date).
in
Page at line 1983
string
getCollectionDescription()
Get the description of a page.
in
Page at line 1996
int|null
getCollectionParentID()
Ges the cID of the parent page.
in
Page at line 2008
static int|null
getCollectionParentIDFromChildID(int $cID)
Get the parent cID of a page given its cID.
in
Page at line 2022
int[]
getCollectionParentIDs()
Get an array containint this cParentID and aliased parentIDs.
in
Page at line 2039
bool|int|null
isMasterCollection()
Is this page a page default?
in
Page at line 2049
bool|int|null
overrideTemplatePermissions()
Are template permissions overriden?
in
Page at line 2059
int|null
getCollectionDisplayOrder()
Get the position of the page in the sitemap, relative to its parent page.
in
Page at line 2069
setTheme(Theme $pl)
Set the theme of this page.
in
Page at line 2081
setThemeSkin(SkinInterface $skin)
Set the theme skin of this page.
in
Page at line 2092
setPageType(Type $type = null)
Set the theme for a page using the page object.
in
Page at line 2106
setPermissionsInheritanceToTemplate()
Set the permissions of sub-collections added beneath this permissions to inherit from the template.
in
Page at line 2117
setPermissionsInheritanceToOverride()
Set the permissions of sub-collections added beneath this permissions to inherit from the parent.
in
Page at line 2130
int|null
getPermissionsCollectionID()
Get the ID of the page from which this page inherits permissions from.
in
Page at line 2140
string|null
getCollectionInheritance()
Where permissions should be inherited from? 'PARENT' or 'TEMPLATE' or 'OVERRIDE'.
in
Page at line 2150
int|null
getParentPermissionsCollectionID()
Get the ID of the page from which the parent page page inherits permissions from.
in
Page at line 2170
Page
getPermissionsCollectionObject()
Get the page from which this page inherits permissions from.
in
Page at line 2180
int
getMasterCollectionID()
Get the master page of this page, given its page template and page type.
in
Page at line 2200
int|null
getOriginalCollectionID()
Get the ID of the original collection.
in
Page at line 2213
int|null
getNumChildren()
Get the number of child pages.
in
Page at line 2223
int
getNumChildrenDirect()
Get the number of child pages (direct children only).
in
Page at line 2243
Page|false
getFirstChild(string $sortColumn = 'cDisplayOrder asc')
Get the first child of the current page, or null if there is no child.
in
Page at line 2279
int[]
getCollectionChildrenArray(bool $oneLevelOnly = 0)
Get the list of child page IDs, sorted by their display order.
in
Page at line 2292
Page[]
getCollectionChildren()
Get the immediate children of the this page.
in
Page at line 2317
bool
canMoveCopyTo(Collection $cobj)
Check if a collection is this page itself or one of its sub-pages.
in
Page at line 2330
updateCollectionName(string $name)
Update the collection name.
in
Page at line 2357
bool
hasPageThemeCustomizations()
Does this page have theme customizations?
in
Page at line 2371
string
getPageWrapperClass()
Get the CSS class to be used to wrap the whole page contents.
in
Page at line 2422
update(array $data)
Update the data of this page.
in
Page at line 2575
clearPagePermissions()
Clear all the page permissions.
in
Page at line 2585
inheritPermissionsFromParent()
Set this page permissions to be inherited from its parent page.
in
Page at line 2602
inheritPermissionsFromDefaults()
Set this page permissions to be inherited from its parent type defaults.
in
Page at line 2625
setPermissionsToManualOverride()
Set this page permissions to be manually specified.
in
Page at line 2646
rescanAreaPermissions()
Rescan the page areas ensuring that they are inheriting permissions properly.
in
Page at line 2661
setOverrideTemplatePermissions(bool|int $cOverrideTemplatePermissions)
Are template permissions overriden?
in
Page at line 2677
updatePermissionsCollectionID(int|string $cParentIDString, mixed $npID)
Set the child pages of a list of parent pages to inherit permissions from the specified page (provided that they previouly had the same inheritance page as this page).
in
Page at line 2701
acquireAreaPermissions(int $permissionsCollectionID)
Acquire the area permissions, copying them from the inherited ones.
in
Page at line 2735
acquirePagePermissions(int $permissionsCollectionID)
Acquire the page permissions, copying them from the inherited ones.
in
Page at line 2757
updateGroupsSubCollection(int|string $cParentIDString)
deprecated
deprecated
No description
in
Page at line 2833
SiblingRelation[]
getPageRelations()
Get the relations of this page.
in
Page at line 2857
move(mixed $nc)
Move this page under a new parent page.
in
Page at line 2948
Page
duplicateAll(null|mixed $nc = null, bool $preserveUserID = false, Site $site = null)
Duplicate this page and all its child pages and return the new Page created.
in
Page at line 2966
Page
duplicate(null|mixed $nc = null, bool $preserveUserID = false, TreeInterface $site = null)
Duplicate this page and return the new Page created.
in
Page at line 3066
moveToTrash()
Move this page and all its child pages to the trash.
in
Page at line 3103
rescanChildrenDisplayOrder()
Regenerate the display order of the child pages.
in
Page at line 3124
bool
isHomePage()
Is this the homepage for the site tree this page belongs to?
in
Page at line 3134
int|null
getSiteHomePageID()
Get the ID of the homepage for the site tree this page belongs to.
in
Page at line 3144
bool
isLocaleHomePage()
deprecated
deprecated
No description
in
Page at line 3156
static int|null
getHomePageID(Page|int $page = null)
Get the ID of the home page.
in
Page at line 3198
PagePath
getAutoGeneratedPagePathObject()
Get a new PagePath object with the computed canonical page path.
in
Page at line 3214
int
getNextSubPageDisplayOrder()
Get the next available display order of child pages.
in
Page at line 3227
string
generatePagePath()
Get 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 3271
rescanCollectionPath()
Recalculate the canonical page path for the current page and its sub-pages, based on its current version, URL slug, etc.
in
Page at line 3305
updateDisplayOrder(int $displayOrder, int|null $cID = 0)
Set a new display order for this page (or for another page given its ID).
in
Page at line 3348
movePageDisplayOrderToTop()
Make this page the first child of its parent.
in
Page at line 3367
movePageDisplayOrderToBottom()
Make this page the first child of its parent.
in
Page at line 3384
movePageDisplayOrderToSibling(Page $c, string $position = 'before')
Move this page before of after another page.
in
Page at line 3414
rescanSystemPageStatus()
Recalculate the "is a system page" state.
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 3454
bool
isInTrash()
Is this page in the trash?
in
Page at line 3462
moveToRoot()
Make this page child of nothing, thus moving it to the root level.
in
Page at line 3473
deactivate()
Mark this page as non active.
in
Page at line 3482
setPageToDraft()
Mark this page as non draft.
in
Page at line 3492
activate()
Mark this page as active.
in
Page at line 3503
bool
isActive()
Is this page marked as active?
in
Page at line 3516
setPageIndexScore(float $score)
Set the page index score (used by a PageList for instance).
in
Page at line 3526
float
getPageIndexScore()
Get the page index score (as set by a PageList for instance).
in
Page at line 3536
string
getPageIndexContent()
Get the indexed content of this page.
in
Page at line 3550
static Page
addHomePage(TreeInterface $siteTree = null)
Add the home page to the system. Typically used only by the installation program.
in
Page at line 3613
Page
add(mixed $pt, array $data, mixed $template = false)
Add a new page, child of this page.
in
Page at line 3783
CustomStyle|null
getCustomStyleObject()
Get the custom style for the currently loaded page version (if any).
in
Page at line 3803
int|null
getCollectionFullPageCaching()
Get the full-page cache flag (-1: use global setting; 0: no; 1: yes - NULL if page is not loaded).
in
Page at line 3813
string|null
getCollectionFullPageCachingLifetime()
Get the full-page cache lifetime criteria ('default': use default lifetime; 'forever': no expiration; 'custom': custom lifetime value - see getCollectionFullPageCachingLifetimeCustomValue(); other: use the default lifetime - NULL if page is not loaded).
in
Page at line 3823
int|null
getCollectionFullPageCachingLifetimeCustomValue()
Get the full-page cache custom lifetime in minutes (to be used if getCollectionFullPageCachingLifetime() is 'custom').
in
Page at line 3833
int
getCollectionFullPageCachingLifetimeValue()
Get the actual full-page cache lifespan (in seconds).
in
Page at line 3942
static Page
addStatic(array $data, TreeInterface $parent = null)
Create a new page.
in
Page at line 4000
static Page|null
getCurrentPage()
Get the currently requested page.
in
Page at line 4013
int
getPageDraftTargetParentPageID()
Get the ID of the draft parent page ID.
in
Page at line 4025
setPageDraftTargetParentPageID(int $cParentID)
Set the ID of the draft parent page ID.
in
Page at line 4045
protected
populatePage(mixed $cInfo, string $where, string|int $cvID)
Read the data from the database.
in
Page at line 4096
protected
_getNumChildren(int $cID, bool $oneLevelOnly = 0, string $sortColumn = 'cDisplayOrder asc')
Populate the childrenCIDArray property (called by the getCollectionChildrenArray() method).
in
Page at line 4123
protected
_duplicateAll(mixed $cParent, mixed $cNewParent, bool $preserveUserID = false, Site $site = null)
Duplicate all the child pages of a specific page which has already have been duplicated.
in
Page at line 4143
getPageSkin()
No description
in
Page at line 4171
protected string
computeCanonicalPagePath()
Get the canonical path string of this page .
This happens before any uniqueness checks get run.
in
Page at line 4208
protected
_associateMasterCollectionBlocks(int $newCID, mixed $masterCID, bool $cAcquireComposerOutputControls)
Duplicate the master collection blocks/permissions to a newly created page.
in
Page at line 4249
protected
_associateMasterCollectionAttributes(int $newCID, mixed $masterCID)
Duplicate the master collection attributes to a newly created page.
in
Page at line 4269
protected
acquireAreaStylesFromDefaults(Template $template)
Copy the area styles from a page template.
in
Page at line 4301
static private string[]
translatePermissionsXMLToKeys(SimpleXMLElement $node)
No description
static
isMultilingualSection($cID)
No description
static protected
getLocaleFromHomePageID($cID)
No description
protected
setLocale($locale)
No description
getLanguageText($locale = null)
No description
getLanguage()
No description
getIcon()
No description
getCountry()
No description
int
getNumberOfPluralForms()
Returns the number of plural forms.
string
getPluralsRule()
Returns the rule to determine which plural we should use (in gettext notation).
array
getPluralsCases()
Returns the plural cases for the language; array keys are the case name, array values are some examples for that case.
static
getIDList(Site $site = null)
No description
static
getList(Site $site = null)
No description
static
getRelatedCollectionIDForLocale($cID, $locale)
No description
static
getMultilingualPageRelationID($cID)
No description
static
isAssigned($page)
No description
static
getCollectionIDForLocale($mpRelationID, $locale)
No description
static
registerDuplicate($newPage, $oldPage)
No description
static Section
getCurrentSection()
Gets the MultilingualSection object for the current section of the site.
static
getByLocaleOrLanguage($locale)
No description
getLocaleObject()
No description
getLocale()
No description
static
getDefaultSection(Site $site = null)
No description
static
unregisterPage($page)
No description
static
registerPage($page)
No description
static
registerMove($page, $oldParent, $newParent)
No description
static
relatePage($oldPage, $newPage, $locale)
No description
isDefaultMultilingualSection(Site $site = null)
No description
static
ignorePageRelation($page, $locale)
No description
int|null
getTranslatedPageID($page)
Receives a page in a different language tree, and tries to return the corresponding page in the current language tree.
Translations
getSectionInterfaceTranslations(bool $untranslatedFirst = false)
Loads the translations of this multilingual section.