class Section extends Page (View source)

Traits

Properties

protected $controller from  Page
protected $blocksAliasedFromMasterCollection from  Page
protected $cPointerOriginalID from  Page
$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

assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)

No description

static Page
getByPath(string $path, string $version = 'RECENT', TreeInterface $tree = null)

No description

from  Page
static Page
getByID(int $cID, int|string $cvID = 'RECENT')

Returns an instance of MultilingualSection for the given page ID.

__construct()

No description

from  Page
populatePage($cInfo, $where, $cvID)

No description

from  Page
from  Page
getJSONObject()

Return a representation of the Page object as something easily serializable.

from  Page
PageController
getPageController()

No description

from  Page
from  Page
bool
isEditMode()

Is the page in edit mode.

from  Page
int
getPackageID()

Get the package ID for a page (page thats added by a package) (returns 0 if its not in a package).

from  Page
string
getPackageHandle()

Get the package handle for a page (page thats added by a package).

from  Page
bool
isArrangeMode()

Returns 1 if the page is in arrange mode.

from  Page
forceCheckIn()

Forces the page to be checked in if its checked out.

from  Page
bool
isAdminArea()

Checks if the page is a dashboard page, returns true if it is.

from  Page
static 
getFromRequest(Request $request)

Uses a Request object to determine which page to load. queries by path and then by cID.

from  Page
processArrangement($area_id, $moved_block_id, $block_order)

No description

from  Page
bool
isCheckedOut()

checks if the page is checked out, if it is return true.

from  Page
getCollectionCheckedOutUserName()

Gets the user that is editing the current page.

from  Page
bool
isCheckedOutByMe()

Checks if the page is checked out by the current user.

from  Page
bool
isGeneratedCollection()

Checks if the page is a single page.

from  Page
setPermissionsToOverride()

No description

from  Page
from  Page
removePermissions($userOrGroup, $permissions = [])

No description

from  Page
static 
getDrafts(Site $site)

No description

from  Page
isPageDraft()

No description

from  Page
static 
translatePermissionsXMLToKeys($node)

No description

from  Page
setController($controller)

No description

from  Page
getController() deprecated

No description

from  Page
assignPermissionSet($px)

No description

from  Page
int
addCollectionAlias(Collection $c)

Make an alias to a page.

from  Page
updateCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)

Update the name, link, and to open in a new window for an external link.

from  Page
int
addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)

Add a new external link.

from  Page
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.

from  Page
string
getCollectionIcon()

Gets the icon for a page (also fires the on_page_get_icon event).

from  Page
int
removeThisAlias()

Remove an external link/alias.

from  Page
populateRecursivePages($pages, $pageRow, $cParentID, $level, $includeThisPage = true)

No description

from  Page
queueForDeletionSort($a, $b)

No description

from  Page
queueForDuplicationSort($a, $b)

No description

from  Page
queueForDeletion()

No description

from  Page
queueForDeletionRequest($queue = null, $includeThisPage = true)

No description

from  Page
queueForDuplication($destination, $includeParent = true)

No description

from  Page
export($pageNode, $includePublicDate = true)

No description

from  Page
int
getCollectionCheckedOutUserID()

Returns the uID for a page that is checked out.

from  Page
string
getCollectionPath()

Returns the path for the current page.

from  Page
getCollectionPathObject()

Returns the PagePath object for the current page.

from  Page
addAdditionalPagePath($cPath, $commit = true)

Adds a non-canonical page path to the current page.

from  Page
setCanonicalPagePath($cPath, $isAutoGenerated = false)

Sets the canonical page path for a page.

from  Page
getPagePaths()

No description

from  Page
getAdditionalPagePaths()

No description

from  Page
clearPagePaths()

Clears all page paths for a page.

from  Page
string
getCollectionLink($appendBaseURL = false)

Returns full url for the current page.

from  Page
getSiteTreeID()

No description

from  Page
getSite()

No description

from  Page
getSiteTreeObject()

No description

from  Page
static string
getCollectionPathFromID($cID)

Returns the path for a page from its cID.

from  Page
int
getCollectionUserID()

Returns the uID for a page ownder.

from  Page
string
getCollectionHandle()

Returns the page's handle.

from  Page
getCollectionTypeName() deprecated

No description

from  Page
getPageTypeName()

No description

from  Page
getCollectionTypeID() deprecated

No description

from  Page
int
getPageTypeID()

Returns the Collection Type ID.

from  Page
getPageTypeObject()

No description

from  Page
int
getPageTemplateID()

Returns the Page Template ID.

from  Page
PageTemplate
getPageTemplateObject()

Returns the Page Template Object.

from  Page
string
getPageTemplateHandle()

Returns the Page Template handle.

from  Page
string
getPageTypeHandle()

Returns the Collection Type handle.

from  Page
getCollectionTypeHandle()

No description

from  Page
int
getCollectionThemeID()

Returns theme id for the collection.

from  Page
bool
isBlockAliasedFromMasterCollection(Block $b)

Check if a block is an alias from a page default.

from  Page
getCollectionThemeObject()

Returns Collection's theme object.

from  Page
string
getCollectionName()

Returns the page's name.

from  Page
int
getCollectionPointerID()

Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).

from  Page
string
getCollectionPointerExternalLink()

Returns link for the aliased page.

from  Page
bool
openCollectionPointerExternalLinkInNewWindow()

Returns if the alias opens in a new window.

from  Page
bool
isAlias()

Checks to see if the page is an alias.

from  Page
bool
isExternalLink()

Checks if a page is an external link.

from  Page
int
getCollectionPointerOriginalID()

Get the original cID of a page.

from  Page
string
getCollectionFilename()

Get the file name of a page (single pages).

from  Page
string
getCollectionDatePublic()

Gets the date a the current version was made public,.

from  Page
DateTime|null
from  Page
string
getCollectionDescription()

Get the description of a page.

from  Page
int
getCollectionParentID()

Gets the cID of the page's parent.

from  Page
static int
getCollectionParentIDFromChildID(int $cID)

Get the Parent cID from a page by using a cID.

from  Page
array
getCollectionParentIDs()

Returns an array of this cParentID and aliased parentIDs.

from  Page
bool
isMasterCollection()

Checks if a page is a page default.

from  Page
string
overrideTemplatePermissions()

Gets the template permissions.

from  Page
int
getCollectionDisplayOrder()

Gets the position of the page in the sitemap.

from  Page
setTheme(PageTheme $pl)

Set the theme for a page using the page object.

from  Page
setPageType(Type $type = null)

Set the theme for a page using the page object.

from  Page
setPermissionsInheritanceToTemplate()

Set the permissions of sub-collections added beneath this permissions to inherit from the template.

from  Page
setPermissionsInheritanceToOverride()

Set the permissions of sub-collections added beneath this permissions to inherit from the parent.

from  Page
getPermissionsCollectionID()

No description

from  Page
getCollectionInheritance()

No description

from  Page
from  Page
from  Page
getMasterCollectionID()

Given the current page's template and page type, we return the master page.

from  Page
getOriginalCollectionID()

No description

from  Page
getNumChildren()

No description

from  Page
getNumChildrenDirect()

No description

from  Page
getFirstChild(string $sortColumn = 'cDisplayOrder asc')

Returns the first child of the current page, or null if there is no child.

from  Page
getCollectionChildrenArray($oneLevelOnly = 0)

No description

from  Page
getCollectionChildren()

Returns the immediate children of the current page.

from  Page
_getNumChildren($cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc')

No description

from  Page
canMoveCopyTo($cobj)

No description

from  Page
updateCollectionName($name)

No description

from  Page
hasPageThemeCustomizations()

No description

from  Page
resetCustomThemeStyles()

No description

from  Page
setCustomStyleObject(Theme $pt, ValueList $valueList, $selectedPreset = false, CustomCssRecord $customCssRecord = null)

No description

from  Page
getPageWrapperClass()

No description

from  Page
writePageThemeCustomizations()

No description

from  Page
static 
resetAllCustomStyles()

No description

from  Page
update($data)

No description

from  Page
clearPagePermissions()

No description

from  Page
inheritPermissionsFromParent()

No description

from  Page
from  Page
from  Page
rescanAreaPermissions()

No description

from  Page
setOverrideTemplatePermissions($cOverrideTemplatePermissions)

No description

from  Page
updatePermissionsCollectionID($cParentIDString, $npID)

No description

from  Page
acquireAreaPermissions($permissionsCollectionID)

No description

from  Page
acquirePagePermissions($permissionsCollectionID)

No description

from  Page
__destruct()

No description

from  Page
updateGroupsSubCollection($cParentIDString)

No description

from  Page
addBlock($bt, $a, $data)

No description

from  Page
getPageRelations()

No description

from  Page
move($nc)

No description

from  Page
duplicateAll($nc = null, $preserveUserID = false, Site $site = null)

No description

from  Page
_duplicateAll($cParent, $cNewParent, $preserveUserID = false, Site $site = null)

No description

from  Page
duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)

No description

from  Page
delete()

No description

from  Page
moveToTrash()

No description

from  Page
rescanChildrenDisplayOrder()

No description

from  Page
isHomePage()

No description

from  Page
getSiteHomePageID()

No description

from  Page
from  Page
getNextSubPageDisplayOrder()

No description

from  Page
generatePagePath()

Returns the URL-slug-based path to the current page (including any suffixes) in a string format. Does so in real time.

from  Page
rescanCollectionPath()

Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.

from  Page
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.

from  Page
updateDisplayOrder($do, $cID = 0)

No description

from  Page
movePageDisplayOrderToTop()

No description

from  Page
movePageDisplayOrderToBottom()

No description

from  Page
movePageDisplayOrderToSibling(Page $c, $position = 'before')

No description

from  Page
rescanSystemPageStatus()

Looks at the current page. If the site tree ID is 0, sets system page to true.

from  Page
isInTrash()

No description

from  Page
moveToRoot()

No description

from  Page
deactivate()

No description

from  Page
activate()

No description

from  Page
isActive()

No description

from  Page
setPageIndexScore($score)

No description

from  Page
getPageIndexScore()

No description

from  Page
getPageIndexContent()

No description

from  Page
_associateMasterCollectionBlocks($newCID, $masterCID, $cAcquireComposerOutputControls)

No description

from  Page
_associateMasterCollectionAttributes($newCID, $masterCID)

No description

from  Page
static page
addHomePage(TreeInterface $siteTree = null)

Adds the home page to the system. Typically used only by the installation program.

from  Page
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.

from  Page
acquireAreaStylesFromDefaults(Template $template)

No description

from  Page
getCustomStyleObject()

No description

from  Page
getCollectionFullPageCaching()

No description

from  Page
static 
addStatic($data, TreeInterface $parent = null)

No description

from  Page
static 
getCurrentPage()

No description

from  Page
getTotalPageViews($date = null)

Returns the total number of page views for a specific page.

from  Page
from  Page
setPageDraftTargetParentPageID($cParentID)

No description

from  Page
getPageStatistics($limit = 20)

Gets a pages statistics.

from  Page
static 
isMultilingualSection($cID)

No description

static 
getLocaleFromHomePageID($cID)

No description

setLocale($locale)

No description

static Section
getBySectionOfSite(Page $page)

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|false
getByLocale($locale, Site $site = 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.

Details

assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)

No description

Parameters

$userOrGroup
$permissions
$accessType
$cascadeToChildren

static Page getByPath(string $path, string $version = 'RECENT', TreeInterface $tree = null)

No description

Parameters

string $path /path/to/page
string $version

ACTIVE or RECENT

TreeInterface $tree

Return Value

Page

static Page getByID(int $cID, int|string $cvID = 'RECENT')

Returns an instance of MultilingualSection for the given page ID.

Parameters

int $cID

Collection ID of a page

int|string $cvID

Return Value

Page

__construct()

No description

protected populatePage($cInfo, $where, $cvID)

No description

Parameters

$cInfo
$where
$cvID

getPermissionResponseClassName()

No description

getPermissionAssignmentClassName()

No description

getPermissionObjectKeyCategoryHandle()

No description

getJSONObject()

Return a representation of the Page object as something easily serializable.

PageController getPageController()

No description

Return Value

PageController

getPermissionObjectIdentifier()

No description

bool isEditMode()

Is the page in edit mode.

Return Value

bool

int getPackageID()

Get the package ID for a page (page thats added by a package) (returns 0 if its not in a package).

Return Value

int

string getPackageHandle()

Get the package handle for a page (page thats added by a package).

Return Value

string

bool isArrangeMode()

Returns 1 if the page is in arrange mode.

Return Value

bool

forceCheckIn()

Forces the page to be checked in if its checked out.

bool isAdminArea()

Checks if the page is a dashboard page, returns true if it is.

Return Value

bool

static getFromRequest(Request $request)

Uses a Request object to determine which page to load. queries by path and then by cID.

Parameters

Request $request

processArrangement($area_id, $moved_block_id, $block_order)

No description

Parameters

$area_id
$moved_block_id
$block_order

bool isCheckedOut()

checks if the page is checked out, if it is return true.

Return Value

bool

getCollectionCheckedOutUserName()

Gets the user that is editing the current page.

$return string $name.

bool isCheckedOutByMe()

Checks if the page is checked out by the current user.

Return Value

bool

bool isGeneratedCollection()

Checks if the page is a single page.

Return Value

bool

setPermissionsToOverride()

No description

setChildPermissionsToOverride()

No description

removePermissions($userOrGroup, $permissions = [])

No description

Parameters

$userOrGroup
$permissions

static getDrafts(Site $site)

No description

Parameters

Site $site

isPageDraft()

No description

static private translatePermissionsXMLToKeys($node)

No description

Parameters

$node

setController($controller)

No description

Parameters

$controller

getController() deprecated

deprecated

No description

private assignPermissionSet($px)

No description

Parameters

$px

int addCollectionAlias(Collection $c)

Make an alias to a page.

Parameters

Collection $c

Return Value

int $newCID

updateCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)

Update the name, link, and to open in a new window for an external link.

Parameters

string $cName
string $cLink
bool $newWindow

int addCollectionAliasExternal(string $cName, string $cLink, bool $newWindow = 0)

Add a new external link.

Parameters

string $cName
string $cLink
bool $newWindow

Return Value

int $newCID

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.

Return Value

bool

string getCollectionIcon()

Gets the icon for a page (also fires the on_page_get_icon event).

Return Value

string

$icon Path to the icon

int removeThisAlias()

Remove an external link/alias.

Return Value

int

$cIDRedir cID for the original page if the page was an alias

populateRecursivePages($pages, $pageRow, $cParentID, $level, $includeThisPage = true)

No description

Parameters

$pages
$pageRow
$cParentID
$level
$includeThisPage

queueForDeletionSort($a, $b)

No description

Parameters

$a
$b

queueForDuplicationSort($a, $b)

No description

Parameters

$a
$b

queueForDeletion()

No description

queueForDeletionRequest($queue = null, $includeThisPage = true)

No description

Parameters

$queue
$includeThisPage

queueForDuplication($destination, $includeParent = true)

No description

Parameters

$destination
$includeParent

export($pageNode, $includePublicDate = true)

No description

Parameters

$pageNode
$includePublicDate

int getCollectionCheckedOutUserID()

Returns the uID for a page that is checked out.

Return Value

int

string getCollectionPath()

Returns the path for the current page.

Return Value

string

getCollectionPathObject()

Returns the PagePath object for the current page.

addAdditionalPagePath($cPath, $commit = true)

Adds a non-canonical page path to the current page.

Parameters

$cPath
$commit

setCanonicalPagePath($cPath, $isAutoGenerated = false)

Sets the canonical page path for a page.

Parameters

$cPath
$isAutoGenerated

getPagePaths()

No description

getAdditionalPagePaths()

No description

clearPagePaths()

Clears all page paths for a page.

Returns full url for the current page.

Parameters

$appendBaseURL

Return Value

string

getSiteTreeID()

No description

Site getSite()

No description

Return Value

Site

Tree getSiteTreeObject()

No description

Return Value

Tree

static string getCollectionPathFromID($cID)

Returns the path for a page from its cID.

Parameters

$cID

Return Value

string $path

int getCollectionUserID()

Returns the uID for a page ownder.

Return Value

int

string getCollectionHandle()

Returns the page's handle.

Return Value

string

getCollectionTypeName() deprecated

deprecated

No description

getPageTypeName()

No description

getCollectionTypeID() deprecated

deprecated

No description

int getPageTypeID()

Returns the Collection Type ID.

Return Value

int

getPageTypeObject()

No description

int getPageTemplateID()

Returns the Page Template ID.

Return Value

int

PageTemplate getPageTemplateObject()

Returns the Page Template Object.

Return Value

PageTemplate

string getPageTemplateHandle()

Returns the Page Template handle.

Return Value

string

string getPageTypeHandle()

Returns the Collection Type handle.

Return Value

string

getCollectionTypeHandle()

No description

int getCollectionThemeID()

Returns theme id for the collection.

Return Value

int

bool isBlockAliasedFromMasterCollection(Block $b)

Check if a block is an alias from a page default.

Parameters

Block $b

Return Value

bool

Theme getCollectionThemeObject()

Returns Collection's theme object.

Return Value

Theme

string getCollectionName()

Returns the page's name.

Return Value

string

int getCollectionPointerID()

Returns the collection ID for the aliased page (returns 0 unless used on an actual alias).

Return Value

int

Returns link for the aliased page.

Return Value

string

bool openCollectionPointerExternalLinkInNewWindow()

Returns if the alias opens in a new window.

Return Value

bool

bool isAlias()

Checks to see if the page is an alias.

Return Value

bool

Checks if a page is an external link.

Return Value

bool

int getCollectionPointerOriginalID()

Get the original cID of a page.

Return Value

int

string getCollectionFilename()

Get the file name of a page (single pages).

Return Value

string

string getCollectionDatePublic()

Gets the date a the current version was made public,.

Return Value

string

date formated like: 2009-01-01 00:00:00

DateTime|null getCollectionDatePublicObject()

No description

Return Value

DateTime|null

Returns the \DateTime instance (or null if the current version doesn't have public date)

string getCollectionDescription()

Get the description of a page.

Return Value

string

int getCollectionParentID()

Gets the cID of the page's parent.

Return Value

int

static int getCollectionParentIDFromChildID(int $cID)

Get the Parent cID from a page by using a cID.

Parameters

int $cID

Return Value

int

array getCollectionParentIDs()

Returns an array of this cParentID and aliased parentIDs.

Return Value

array $cID

bool isMasterCollection()

Checks if a page is a page default.

Return Value

bool

string overrideTemplatePermissions()

Gets the template permissions.

Return Value

string

int getCollectionDisplayOrder()

Gets the position of the page in the sitemap.

Return Value

int

setTheme(PageTheme $pl)

Set the theme for a page using the page object.

Parameters

PageTheme $pl

setPageType(Type $type = null)

Set the theme for a page using the page object.

Parameters

Type $type

setPermissionsInheritanceToTemplate()

Set the permissions of sub-collections added beneath this permissions to inherit from the template.

setPermissionsInheritanceToOverride()

Set the permissions of sub-collections added beneath this permissions to inherit from the parent.

getPermissionsCollectionID()

No description

getCollectionInheritance()

No description

getParentPermissionsCollectionID()

No description

getPermissionsCollectionObject()

No description

getMasterCollectionID()

Given the current page's template and page type, we return the master page.

getOriginalCollectionID()

No description

getNumChildren()

No description

getNumChildrenDirect()

No description

Page getFirstChild(string $sortColumn = 'cDisplayOrder asc')

Returns the first child of the current page, or null if there is no child.

Parameters

string $sortColumn

Return Value

Page

getCollectionChildrenArray($oneLevelOnly = 0)

No description

Parameters

$oneLevelOnly

getCollectionChildren()

Returns the immediate children of the current page.

protected _getNumChildren($cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc')

No description

Parameters

$cID
$oneLevelOnly
$sortColumn

canMoveCopyTo($cobj)

No description

Parameters

$cobj

updateCollectionName($name)

No description

Parameters

$name

hasPageThemeCustomizations()

No description

resetCustomThemeStyles()

No description

setCustomStyleObject(Theme $pt, ValueList $valueList, $selectedPreset = false, CustomCssRecord $customCssRecord = null)

No description

Parameters

Theme $pt
ValueList $valueList
$selectedPreset
CustomCssRecord $customCssRecord

getPageWrapperClass()

No description

writePageThemeCustomizations()

No description

static resetAllCustomStyles()

No description

update($data)

No description

Parameters

$data

clearPagePermissions()

No description

inheritPermissionsFromParent()

No description

inheritPermissionsFromDefaults()

No description

setPermissionsToManualOverride()

No description

rescanAreaPermissions()

No description

setOverrideTemplatePermissions($cOverrideTemplatePermissions)

No description

Parameters

$cOverrideTemplatePermissions

updatePermissionsCollectionID($cParentIDString, $npID)

No description

Parameters

$cParentIDString
$npID

acquireAreaPermissions($permissionsCollectionID)

No description

Parameters

$permissionsCollectionID

acquirePagePermissions($permissionsCollectionID)

No description

Parameters

$permissionsCollectionID

__destruct()

No description

updateGroupsSubCollection($cParentIDString)

No description

Parameters

$cParentIDString

addBlock($bt, $a, $data)

No description

Parameters

$bt
$a
$data

getPageRelations()

No description

move($nc)

No description

Parameters

$nc

duplicateAll($nc = null, $preserveUserID = false, Site $site = null)

No description

Parameters

$nc
$preserveUserID
Site $site

protected _duplicateAll($cParent, $cNewParent, $preserveUserID = false, Site $site = null)

No description

Parameters

$cParent
$cNewParent
$preserveUserID
Site $site

duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)

No description

Parameters

$nc
$preserveUserID
TreeInterface $site

delete()

No description

moveToTrash()

No description

rescanChildrenDisplayOrder()

No description

isHomePage()

No description

getSiteHomePageID()

No description

getAutoGeneratedPagePathObject()

No description

getNextSubPageDisplayOrder()

No description

generatePagePath()

Returns the URL-slug-based path to the current page (including any suffixes) in a string format. Does so in real time.

rescanCollectionPath()

Recalculates the canonical page path for the current page, based on its current version, URL slug, etc.

.

protected string computeCanonicalPagePath()

For the curret page, return the text that will be used for that pages canonical path. This happens before any uniqueness checks get run.

Return Value

string

updateDisplayOrder($do, $cID = 0)

No description

Parameters

$do
$cID

movePageDisplayOrderToTop()

No description

movePageDisplayOrderToBottom()

No description

movePageDisplayOrderToSibling(Page $c, $position = 'before')

No description

Parameters

Page $c
$position

rescanSystemPageStatus()

Looks at the current page. If the site tree ID is 0, sets system page to true.

If the site tree is not user, looks at where the page falls in the hierarchy. If it's inside a page at the top level that has 0 as its parent, then it is considered a system page.

isInTrash()

No description

moveToRoot()

No description

deactivate()

No description

activate()

No description

isActive()

No description

setPageIndexScore($score)

No description

Parameters

$score

getPageIndexScore()

No description

getPageIndexContent()

No description

protected _associateMasterCollectionBlocks($newCID, $masterCID, $cAcquireComposerOutputControls)

No description

Parameters

$newCID
$masterCID
$cAcquireComposerOutputControls

protected _associateMasterCollectionAttributes($newCID, $masterCID)

No description

Parameters

$newCID
$masterCID

static page addHomePage(TreeInterface $siteTree = null)

Adds the home page to the system. Typically used only by the installation program.

Parameters

TreeInterface $siteTree

Return Value

page

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.

Parameters

Type $pt
array $data
$template

Return Value

page

protected acquireAreaStylesFromDefaults(Template $template)

No description

Parameters

Template $template

getCustomStyleObject()

No description

getCollectionFullPageCaching()

No description

getCollectionFullPageCachingLifetime()

No description

getCollectionFullPageCachingLifetimeCustomValue()

No description

getCollectionFullPageCachingLifetimeValue()

No description

static addStatic($data, TreeInterface $parent = null)

No description

Parameters

$data
TreeInterface $parent

static getCurrentPage()

No description

getTotalPageViews($date = null)

Returns the total number of page views for a specific page.

Parameters

$date

getPageDraftTargetParentPageID()

No description

setPageDraftTargetParentPageID($cParentID)

No description

Parameters

$cParentID

getPageStatistics($limit = 20)

Gets a pages statistics.

Parameters

$limit

static isMultilingualSection($cID)

No description

Parameters

$cID

static protected getLocaleFromHomePageID($cID)

No description

Parameters

$cID

protected setLocale($locale)

No description

Parameters

$locale

static Section getBySectionOfSite(Page $page)

No description

Parameters

Page $page

Return Value

Section

getLanguageText($locale = null)

No description

Parameters

$locale

getLanguage()

No description

getIcon()

No description

getCountry()

No description

int getNumberOfPluralForms()

Returns the number of plural forms.

Return Value

int

Examples

For Japanese: returns 1
For English: returns 2
For French: returns 2
For Russian returns 3

string getPluralsRule()

Returns the rule to determine which plural we should use (in gettext notation).

Return Value

string

Examples

For Japanese: returns '0'
For English: returns 'n != 1'
For French: returns 'n > 1'
For Russian returns '(n % 10 == 1 && n % 100 != 11) ? 0 : ((n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) ? 1 : 2)'

array getPluralsCases()

Returns the plural cases for the language; array keys are the case name, array values are some examples for that case.

Return Value

array

Examples

For Japanese: returns
'other' => '0~15, 100, 1000, 10000, 100000, 1000000, …'
For English: returns
'one' => '1',
'other' => '0, 2~16, 100, 1000, 10000, 100000, 1000000, …'
For French: returns
'one' => '0, 1',
'other' => '2~17, 100, 1000, 10000, 100000, 1000000, …'
For Russian returns
'one' => '1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …',
'few' => '2~4, 22~24, 32~34, 42~44, 52~54, 62, 102, 1002, …',
'other' => '0, 5~19, 100, 1000, 10000, 100000, 1000000, …',

static getIDList(Site $site = null)

No description

Parameters

Site $site

static getList(Site $site = null)

No description

Parameters

Site $site

static getRelatedCollectionIDForLocale($cID, $locale)

No description

Parameters

$cID
$locale

static getMultilingualPageRelationID($cID)

No description

Parameters

$cID

static isAssigned($page)

No description

Parameters

$page

static getCollectionIDForLocale($mpRelationID, $locale)

No description

Parameters

$mpRelationID
$locale

static registerDuplicate($newPage, $oldPage)

No description

Parameters

$newPage
$oldPage

static Section|false getByLanguage(string $language, TreeInterface $treeInterface = null)

No description

Parameters

string $language
TreeInterface $treeInterface

Return Value

Section|false

static Section|false getByLocale($locale, Site $site = null)

No description

Parameters

$locale
Site $site

Return Value

Section|false

static Section getCurrentSection()

Gets the MultilingualSection object for the current section of the site.

Return Value

Section

static getByLocaleOrLanguage($locale)

No description

Parameters

$locale

getLocaleObject()

No description

getLocale()

No description

static getDefaultSection(Site $site = null)

No description

Parameters

Site $site

static unregisterPage($page)

No description

Parameters

$page

static registerPage($page)

No description

Parameters

$page

static registerMove($page, $oldParent, $newParent)

No description

Parameters

$page
$oldParent
$newParent

static relatePage($oldPage, $newPage, $locale)

No description

Parameters

$oldPage
$newPage
$locale

isDefaultMultilingualSection(Site $site = null)

No description

Parameters

Site $site

static ignorePageRelation($page, $locale)

No description

Parameters

$page
$locale

int|null getTranslatedPageID($page)

Receives a page in a different language tree, and tries to return the corresponding page in the current language tree.

Parameters

$page

Return Value

int|null

Translations getSectionInterfaceTranslations(bool $untranslatedFirst = false)

Loads the translations of this multilingual section.

Parameters

bool $untranslatedFirst

Set to true to have untranslated strings first

Return Value

Translations