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
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.
Returns the total number of page views for a specific 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 78
static Page
getByPath(string $path, string $version = 'RECENT', TreeInterface $tree = null)
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 132
__construct()
No description
in
Page at line 137
protected
populatePage($cInfo, $where, $cvID)
No description
getPermissionResponseClassName()
No description
in
Page at line 197
getPermissionAssignmentClassName()
No description
getPermissionObjectKeyCategoryHandle()
No description
in
Page at line 210
getJSONObject()
Return a representation of the Page object as something easily serializable.
in
Page at line 222
PageController
getPageController()
No description
in
Page at line 254
getPermissionObjectIdentifier()
No description
in
Page at line 271
bool
isEditMode()
Is the page in edit mode.
in
Page at line 288
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 298
string
getPackageHandle()
Get the package handle for a page (page thats added by a package).
in
Page at line 312
bool
isArrangeMode()
Returns 1 if the page is in arrange mode.
in
Page at line 320
forceCheckIn()
Forces the page to be checked in if its checked out.
in
Page at line 333
bool
isAdminArea()
Checks if the page is a dashboard page, returns true if it is.
in
Page at line 348
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 410
processArrangement($area_id, $moved_block_id, $block_order)
No description
in
Page at line 443
bool
isCheckedOut()
checks if the page is checked out, if it is return true.
in
Page at line 483
getCollectionCheckedOutUserName()
Gets the user that is editing the current page.
$return string $name.
in
Page at line 504
bool
isCheckedOutByMe()
Checks if the page is checked out by the current user.
in
Page at line 516
bool
isGeneratedCollection()
Checks if the page is a single page.
in
Page at line 522
setPermissionsToOverride()
No description
in
Page at line 529
setChildPermissionsToOverride()
No description
in
Page at line 536
removePermissions($userOrGroup, $permissions = [])
No description
in
Page at line 567
static
getDrafts(Site $site)
No description
in
Page at line 584
isPageDraft()
No description
in
Page at line 592
static private
translatePermissionsXMLToKeys($node)
No description
in
Page at line 623
setController($controller)
No description
in
Page at line 631
getController()
deprecated
deprecated
No description
in
Page at line 639
private
assignPermissionSet($px)
No description
in
Page at line 675
int
addCollectionAlias(Collection $c)
Make an alias to a page.
in
Page at line 726
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 750
int
addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)
Add a new external link.
in
Page at line 804
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 814
string
getCollectionIcon()
Gets the icon for a page (also fires the on_page_get_icon event).
in
Page at line 859
int
removeThisAlias()
Remove an external link/alias.
in
Page at line 888
populateRecursivePages($pages, $pageRow, $cParentID, $level, $includeThisPage = true)
No description
in
Page at line 912
queueForDeletionSort($a, $b)
No description
in
Page at line 924
queueForDuplicationSort($a, $b)
No description
in
Page at line 948
queueForDeletion()
No description
in
Page at line 966
queueForDeletionRequest($queue = null, $includeThisPage = true)
No description
in
Page at line 981
queueForDuplication($destination, $includeParent = true)
No description
in
Page at line 995
export($pageNode, $includePublicDate = true)
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
getSiteTreeID()
No description
in
Page at line 1162
Site
getSite()
No description
in
Page at line 1170
Tree
getSiteTreeObject()
No description
in
Page at line 1186
static string
getCollectionPathFromID($cID)
Returns the path for a page from its cID.
in
Page at line 1199
int
getCollectionUserID()
Returns the uID for a page ownder.
in
Page at line 1209
string
getCollectionHandle()
Returns the page's handle.
in
Page at line 1217
getCollectionTypeName()
deprecated
deprecated
No description
in
Page at line 1222
getPageTypeName()
No description
in
Page at line 1235
getCollectionTypeID()
deprecated
deprecated
No description
in
Page at line 1245
int
getPageTypeID()
Returns the Collection Type ID.
in
Page at line 1250
getPageTypeObject()
No description
in
Page at line 1260
int
getPageTemplateID()
Returns the Page Template ID.
in
Page at line 1270
PageTemplate
getPageTemplateObject()
Returns the Page Template Object.
in
Page at line 1280
string
getPageTemplateHandle()
Returns the Page Template handle.
in
Page at line 1295
string
getPageTypeHandle()
Returns the Collection Type handle.
in
Page at line 1311
getCollectionTypeHandle()
No description
in
Page at line 1321
int
getCollectionThemeID()
Returns theme id for the collection.
in
Page at line 1336
bool
isBlockAliasedFromMasterCollection(Block $b)
Check if a block is an alias from a page default.
in
Page at line 1366
Theme
getCollectionThemeObject()
Returns Collection's theme object.
in
Page at line 1400
string
getCollectionName()
Returns the page's name.
in
Page at line 1414
int
getCollectionPointerID()
Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).
in
Page at line 1424
string
getCollectionPointerExternalLink()
Returns link for the aliased page.
in
Page at line 1434
bool
openCollectionPointerExternalLinkInNewWindow()
Returns if the alias opens in a new window.
in
Page at line 1444
bool
isAlias()
Checks to see if the page is an alias.
in
Page at line 1454
bool
isExternalLink()
Checks if a page is an external link.
in
Page at line 1464
int
getCollectionPointerOriginalID()
Get the original cID of a page.
in
Page at line 1474
string
getCollectionFilename()
Get the file name of a page (single pages).
in
Page at line 1484
string
getCollectionDatePublic()
Gets the date a the current version was made public,.
in
Page at line 1492
DateTime|null
getCollectionDatePublicObject()
No description
in
Page at line 1502
string
getCollectionDescription()
Get the description of a page.
in
Page at line 1512
int
getCollectionParentID()
Gets the cID of the page's parent.
in
Page at line 1526
static int
getCollectionParentIDFromChildID(int $cID)
Get the Parent cID from a page by using a cID.
in
Page at line 1540
array
getCollectionParentIDs()
Returns an array of this cParentID and aliased parentIDs.
in
Page at line 1557
bool
isMasterCollection()
Checks if a page is a page default.
in
Page at line 1567
string
overrideTemplatePermissions()
Gets the template permissions.
in
Page at line 1577
int
getCollectionDisplayOrder()
Gets the position of the page in the sitemap.
in
Page at line 1587
setTheme(PageTheme $pl)
Set the theme for a page using the page object.
in
Page at line 1598
setPageType(Type $type = null)
Set the theme for a page using the page object.
in
Page at line 1612
setPermissionsInheritanceToTemplate()
Set the permissions of sub-collections added beneath this permissions to inherit from the template.
in
Page at line 1623
setPermissionsInheritanceToOverride()
Set the permissions of sub-collections added beneath this permissions to inherit from the parent.
in
Page at line 1631
getPermissionsCollectionID()
No description
in
Page at line 1636
getCollectionInheritance()
No description
in
Page at line 1641
getParentPermissionsCollectionID()
No description
in
Page at line 1656
getPermissionsCollectionObject()
No description
in
Page at line 1664
getMasterCollectionID()
Given the current page's template and page type, we return the master page.
in
Page at line 1679
getOriginalCollectionID()
No description
in
Page at line 1687
getNumChildren()
No description
in
Page at line 1692
getNumChildrenDirect()
No description
in
Page at line 1712
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 1723
getCollectionChildrenArray($oneLevelOnly = 0)
No description
in
Page at line 1734
getCollectionChildren()
Returns the immediate children of the current page.
in
Page at line 1752
protected
_getNumChildren($cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc')
No description
in
Page at line 1769
canMoveCopyTo($cobj)
No description
in
Page at line 1778
updateCollectionName($name)
No description
in
Page at line 1801
hasPageThemeCustomizations()
No description
in
Page at line 1810
resetCustomThemeStyles()
No description
in
Page at line 1817
setCustomStyleObject(Theme $pt, ValueList $valueList, $selectedPreset = false, CustomCssRecord $customCssRecord = null)
No description
in
Page at line 1850
getPageWrapperClass()
No description
in
Page at line 1872
writePageThemeCustomizations()
No description
in
Page at line 1893
static
resetAllCustomStyles()
No description
in
Page at line 1900
update($data)
No description
in
Page at line 2055
clearPagePermissions()
No description
in
Page at line 2062
inheritPermissionsFromParent()
No description
in
Page at line 2076
inheritPermissionsFromDefaults()
No description
in
Page at line 2096
setPermissionsToManualOverride()
No description
in
Page at line 2114
rescanAreaPermissions()
No description
in
Page at line 2124
setOverrideTemplatePermissions($cOverrideTemplatePermissions)
No description
in
Page at line 2133
updatePermissionsCollectionID($cParentIDString, $npID)
No description
in
Page at line 2152
acquireAreaPermissions($permissionsCollectionID)
No description
in
Page at line 2181
acquirePagePermissions($permissionsCollectionID)
No description
in
Page at line 2198
__destruct()
No description
in
Page at line 2203
updateGroupsSubCollection($cParentIDString)
No description
in
Page at line 2222
addBlock($bt, $a, $data)
No description
in
Page at line 2256
getPageRelations()
No description
in
Page at line 2273
move($nc)
No description
in
Page at line 2354
duplicateAll($nc = null, $preserveUserID = false, Site $site = null)
No description
in
Page at line 2362
protected
_duplicateAll($cParent, $cNewParent, $preserveUserID = false, Site $site = null)
No description
in
Page at line 2382
duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)
No description
in
Page at line 2491
delete()
No description
in
Page at line 2566
moveToTrash()
No description
in
Page at line 2594
rescanChildrenDisplayOrder()
No description
in
Page at line 2610
isHomePage()
No description
in
Page at line 2615
getSiteHomePageID()
No description
in
Page at line 2623
getAutoGeneratedPagePathObject()
No description
in
Page at line 2634
getNextSubPageDisplayOrder()
No description
in
Page at line 2645
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 2689
rescanCollectionPath()
Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.
.
in
Page at line 2719
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 2746
updateDisplayOrder($do, $cID = 0)
No description
in
Page at line 2756
movePageDisplayOrderToTop()
No description
in
Page at line 2772
movePageDisplayOrderToBottom()
No description
in
Page at line 2782
movePageDisplayOrderToSibling(Page $c, $position = 'before')
No description
in
Page at line 2810
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 2845
isInTrash()
No description
in
Page at line 2850
moveToRoot()
No description
in
Page at line 2858
deactivate()
No description
in
Page at line 2864
activate()
No description
in
Page at line 2870
isActive()
No description
in
Page at line 2875
setPageIndexScore($score)
No description
in
Page at line 2880
getPageIndexScore()
No description
in
Page at line 2885
getPageIndexContent()
No description
in
Page at line 2892
protected
_associateMasterCollectionBlocks($newCID, $masterCID, $cAcquireComposerOutputControls)
No description
in
Page at line 2927
protected
_associateMasterCollectionAttributes($newCID, $masterCID)
No description
in
Page at line 2946
static page
addHomePage(TreeInterface $siteTree = null)
Adds the home page to the system. Typically used only by the installation program.
in
Page at line 2989
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 3132
protected
acquireAreaStylesFromDefaults(Template $template)
No description
in
Page at line 3159
getCustomStyleObject()
No description
in
Page at line 3174
getCollectionFullPageCaching()
No description
in
Page at line 3179
getCollectionFullPageCachingLifetime()
No description
in
Page at line 3184
getCollectionFullPageCachingLifetimeCustomValue()
No description
in
Page at line 3189
getCollectionFullPageCachingLifetimeValue()
No description
in
Page at line 3215
static
addStatic($data, TreeInterface $parent = null)
No description
in
Page at line 3271
static
getCurrentPage()
No description
in
Page at line 3282
getTotalPageViews($date = null)
Returns the total number of page views for a specific page.
in
Page at line 3292
getPageDraftTargetParentPageID()
No description
in
Page at line 3299
setPageDraftTargetParentPageID($cParentID)
No description
in
Page at line 3315
getPageStatistics($limit = 20)
Gets a pages statistics.
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|false
getByLanguage(string $language, TreeInterface $treeInterface = null)
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.