Section
class Section extends Page (View source)
Traits
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 | ||
protected Locale | $locale |
Methods
No description
Returns an instance of MultilingualSection for the given page ID.
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
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
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
assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)
No description
in
Page at line 83
static Page
getByPath(string $path, string $version = 'RECENT', TreeInterface $tree = null)
No description
in
Page at line 109
CategoryInterface
getObjectAttributeCategory()
No description
static Page
getByID(int $cID, int|string $cvID = 'RECENT')
Returns an instance of MultilingualSection for the given page ID.
in
Page at line 143
__construct()
No description
in
Page at line 148
ItemInterface
getExporter()
No description
in
Page at line 153
protected
populatePage($cInfo, $where, $cvID)
No description
getPermissionResponseClassName()
No description
in
Page at line 213
getPermissionAssignmentClassName()
No description
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 767
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 791
int
addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Add a new external link.
in
Page at line 845
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 855
string
getCollectionIcon()
Gets the icon for a page (also fires the on_page_get_icon event).
in
Page at line 900
int
removeThisAlias()
Remove an external link/alias.
in
Page at line 929
populateRecursivePages($pages, $pageRow, $cParentID, $level, $includeThisPage = true)
No description
in
Page at line 953
queueForDeletionSort($a, $b)
No description
in
Page at line 965
queueForDuplicationSort($a, $b)
No description
in
Page at line 989
queueForDeletion()
No description
in
Page at line 1007
queueForDeletionRequest($queue = null, $includeThisPage = true)
No description
in
Page at line 1022
queueForDuplication($destination, $includeParent = true)
No description
in
Page at line 1039
export($pageNode)
deprecated
deprecated
No description
in
Page at line 1050
int
getCollectionCheckedOutUserID()
Returns the uID for a page that is checked out.
in
Page at line 1060
string
getCollectionPath()
Returns the path for the current page.
in
Page at line 1068
getCollectionPathObject()
Returns the PagePath object for the current page.
in
Page at line 1082
addAdditionalPagePath($cPath, $commit = true)
Adds a non-canonical page path to the current page.
in
Page at line 1099
setCanonicalPagePath($cPath, $isAutoGenerated = false)
Sets the canonical page path for a page.
in
Page at line 1116
getPagePaths()
No description
in
Page at line 1125
getAdditionalPagePaths()
No description
in
Page at line 1137
clearPagePaths()
Clears all page paths for a page.
in
Page at line 1152
string
getCollectionLink($appendBaseURL = false)
Returns full url for the current page.
in
Page at line 1157
int|null
getSiteTreeID()
No description
in
Page at line 1162
Site
getSite()
No description
in
Page at line 1175
Tree|null
getSiteTreeObject()
No description
in
Page at line 1191
static string
getCollectionPathFromID($cID)
Returns the path for a page from its cID.
in
Page at line 1204
int
getCollectionUserID()
Returns the uID for a page ownder.
in
Page at line 1214
string
getCollectionHandle()
Returns the page's handle.
in
Page at line 1222
getCollectionTypeName()
deprecated
deprecated
No description
in
Page at line 1227
getPageTypeName()
No description
in
Page at line 1240
getCollectionTypeID()
deprecated
deprecated
No description
in
Page at line 1250
int
getPageTypeID()
Returns the Collection Type ID.
in
Page at line 1255
getPageTypeObject()
No description
in
Page at line 1265
int
getPageTemplateID()
Returns the Page Template ID.
in
Page at line 1275
PageTemplate
getPageTemplateObject()
Returns the Page Template Object.
in
Page at line 1285
string
getPageTemplateHandle()
Returns the Page Template handle.
in
Page at line 1300
string
getPageTypeHandle()
Returns the Collection Type handle.
in
Page at line 1316
getCollectionTypeHandle()
No description
in
Page at line 1326
int
getCollectionThemeID()
Returns theme id for the collection.
in
Page at line 1341
bool
isBlockAliasedFromMasterCollection(Block $b)
Check if a block is an alias from a page default.
in
Page at line 1371
Theme
getCollectionThemeObject()
Returns Collection's theme object.
in
Page at line 1405
string
getCollectionName()
Returns the page's name.
in
Page at line 1419
int
getCollectionPointerID()
Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).
in
Page at line 1429
string
getCollectionPointerExternalLink()
Returns link for the aliased page.
in
Page at line 1439
bool
openCollectionPointerExternalLinkInNewWindow()
Returns if the alias opens in a new window.
in
Page at line 1449
bool
isAlias()
Checks to see if the page is an alias.
in
Page at line 1459
bool
isExternalLink()
Checks if a page is an external link.
in
Page at line 1469
int
getCollectionPointerOriginalID()
Get the original cID of a page.
in
Page at line 1479
string
getCollectionFilename()
Get the file name of a page (single pages).
in
Page at line 1489
string
getCollectionDatePublic()
Gets the date a the current version was made public,.
in
Page at line 1497
DateTime|null
getCollectionDatePublicObject()
No description
in
Page at line 1507
string
getCollectionDescription()
Get the description of a page.
in
Page at line 1517
int
getCollectionParentID()
Gets the cID of the page's parent.
in
Page at line 1531
static int
getCollectionParentIDFromChildID(int $cID)
Get the Parent cID from a page by using a cID.
in
Page at line 1545
array
getCollectionParentIDs()
Returns an array of this cParentID and aliased parentIDs.
in
Page at line 1562
bool
isMasterCollection()
Checks if a page is a page default.
in
Page at line 1572
string
overrideTemplatePermissions()
Gets the template permissions.
in
Page at line 1582
int
getCollectionDisplayOrder()
Gets the position of the page in the sitemap.
in
Page at line 1592
setTheme(PageTheme $pl)
Set the theme for a page using the page object.
in
Page at line 1603
setPageType(Type $type = null)
Set the theme for a page using the page object.
in
Page at line 1617
setPermissionsInheritanceToTemplate()
Set the permissions of sub-collections added beneath this permissions to inherit from the template.
in
Page at line 1628
setPermissionsInheritanceToOverride()
Set the permissions of sub-collections added beneath this permissions to inherit from the parent.
in
Page at line 1636
getPermissionsCollectionID()
No description
in
Page at line 1641
getCollectionInheritance()
No description
in
Page at line 1646
getParentPermissionsCollectionID()
No description
in
Page at line 1661
getPermissionsCollectionObject()
No description
in
Page at line 1669
getMasterCollectionID()
Given the current page's template and page type, we return the master page.
in
Page at line 1684
getOriginalCollectionID()
No description
in
Page at line 1692
getNumChildren()
No description
in
Page at line 1697
getNumChildrenDirect()
No description
in
Page at line 1717
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 1728
getCollectionChildrenArray($oneLevelOnly = 0)
No description
in
Page at line 1739
getCollectionChildren()
Returns the immediate children of the current page.
in
Page at line 1757
protected
_getNumChildren($cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc')
No description
in
Page at line 1774
canMoveCopyTo($cobj)
No description
in
Page at line 1783
updateCollectionName($name)
No description
in
Page at line 1806
hasPageThemeCustomizations()
No description
in
Page at line 1815
resetCustomThemeStyles()
No description
in
Page at line 1822
setCustomStyleObject(Theme $pt, ValueList $valueList, $selectedPreset = false, CustomCssRecord $customCssRecord = null)
No description
in
Page at line 1855
getPageWrapperClass()
No description
in
Page at line 1877
writePageThemeCustomizations()
No description
in
Page at line 1898
static
resetAllCustomStyles()
No description
in
Page at line 1905
update($data)
No description
in
Page at line 2060
clearPagePermissions()
No description
in
Page at line 2067
inheritPermissionsFromParent()
No description
in
Page at line 2081
inheritPermissionsFromDefaults()
No description
in
Page at line 2101
setPermissionsToManualOverride()
No description
in
Page at line 2119
rescanAreaPermissions()
No description
in
Page at line 2129
setOverrideTemplatePermissions($cOverrideTemplatePermissions)
No description
in
Page at line 2138
updatePermissionsCollectionID($cParentIDString, $npID)
No description
in
Page at line 2157
acquireAreaPermissions($permissionsCollectionID)
No description
in
Page at line 2186
acquirePagePermissions($permissionsCollectionID)
No description
in
Page at line 2203
__destruct()
No description
in
Page at line 2208
updateGroupsSubCollection($cParentIDString)
No description
in
Page at line 2236
Block
addBlock(BlockType $bt, Area $a, array $data)
Adds a block to the page.
in
Page at line 2279
getPageRelations()
No description
in
Page at line 2296
move($nc)
No description
in
Page at line 2377
duplicateAll($nc = null, $preserveUserID = false, Site $site = null)
No description
in
Page at line 2385
protected
_duplicateAll($cParent, $cNewParent, $preserveUserID = false, Site $site = null)
No description
in
Page at line 2405
duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)
No description
in
Page at line 2514
delete()
No description
in
Page at line 2589
moveToTrash()
No description
in
Page at line 2617
rescanChildrenDisplayOrder()
No description
in
Page at line 2633
isHomePage()
No description
in
Page at line 2643
int|null
getSiteHomePageID()
Get the ID of the homepage for the site tree this page belongs to.
in
Page at line 2653
bool
isLocaleHomePage()
Is this page the homepage of a site tree?
in
Page at line 2665
static int|null
getHomePageID(Page|int $page = null)
Get the ID of the home page.
in
Page at line 2689
getAutoGeneratedPagePathObject()
No description
in
Page at line 2700
getNextSubPageDisplayOrder()
No description
in
Page at line 2711
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 2755
rescanCollectionPath()
Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.
.
in
Page at line 2785
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 2812
updateDisplayOrder($do, $cID = 0)
No description
in
Page at line 2822
movePageDisplayOrderToTop()
No description
in
Page at line 2838
movePageDisplayOrderToBottom()
No description
in
Page at line 2848
movePageDisplayOrderToSibling(Page $c, $position = 'before')
No description
in
Page at line 2876
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 2911
isInTrash()
No description
in
Page at line 2916
moveToRoot()
No description
in
Page at line 2924
deactivate()
No description
in
Page at line 2930
setPageToDraft()
No description
in
Page at line 2937
activate()
No description
in
Page at line 2943
isActive()
No description
in
Page at line 2948
setPageIndexScore($score)
No description
in
Page at line 2953
getPageIndexScore()
No description
in
Page at line 2958
getPageIndexContent()
No description
in
Page at line 2965
protected
_associateMasterCollectionBlocks($newCID, $masterCID, $cAcquireComposerOutputControls)
No description
in
Page at line 3000
protected
_associateMasterCollectionAttributes($newCID, $masterCID)
No description
in
Page at line 3019
static page
addHomePage(TreeInterface $siteTree = null)
Adds the home page to the system. Typically used only by the installation program.
in
Page at line 3062
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 3210
protected
acquireAreaStylesFromDefaults(Template $template)
No description
in
Page at line 3237
getCustomStyleObject()
No description
in
Page at line 3252
getCollectionFullPageCaching()
No description
in
Page at line 3257
getCollectionFullPageCachingLifetime()
No description
in
Page at line 3262
getCollectionFullPageCachingLifetimeCustomValue()
No description
in
Page at line 3267
getCollectionFullPageCachingLifetimeValue()
No description
in
Page at line 3293
static
addStatic($data, TreeInterface $parent = null)
No description
in
Page at line 3350
static
getCurrentPage()
No description
in
Page at line 3358
getPageDraftTargetParentPageID()
No description
in
Page at line 3365
setPageDraftTargetParentPageID($cParentID)
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.