Class Page

The page object in Concrete encapsulates all the functionality used by a typical page and their contents including blocks, page metadata, page permissions.

Collection
Extended by Concrete\Core\Page\Page implements Concrete\Core\Permission\ObjectInterface
Namespace: Concrete\Core\Page
Located at src/Page/Page.php

Methods summary

public static Concrete\Core\Page\Page
# getByPath( string $path, string $version = 'RECENT' )
public static Concrete\Core\Page\Page
# getByID( integer $cID, string $version = 'RECENT' )
public
protected
# populatePage( $cInfo, $where, $cvID )
public
public
public
public
# getJSONObject( )

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

public PageController
# getPageController( )
public
public boolean
# isEditMode( )

Is the page in edit mode.

public integer
# getPackageID( )

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

public string
# getPackageHandle( )

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

public boolean
# isArrangeMode( )

Returns 1 if the page is in arrange mode.

public
# forceCheckIn( )

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

public boolean
# isAdminArea( )

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

public static
# getFromRequest( Request $request )

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

public
# processArrangement( $area_id, $moved_block_id, $block_order )
public boolean
# isCheckedOut( )

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

public
# getCollectionCheckedOutUserName( )

Gets the user that is editing the current page. $return string $name.

public boolean
# isCheckedOutByMe( )

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

public boolean
# isGeneratedCollection( )

Checks if the page is a single page.

public
# assignPermissions( $userOrGroup, $permissions = array(), $accessType = Concrete\Core\Page\PagePermissionKey::ACCESS_TYPE_INCLUDE )
public
# removePermissions( $userOrGroup, $permissions = array() )
public static
public
public
# setController( $controller )
public
# getController( )
public
# assignPermissionSet( $px )
public integer
# addCollectionAlias( Collection $c )

Make an alias to a page.

public
# updateCollectionAliasExternal( string $cName, string $cLink, boolean $newWindow = 0 )

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

public integer
# addCollectionAliasExternal( string $cName, string $cLink, boolean $newWindow = 0 )

Add a new external link.

public boolean
# isSystemPage( )

Check if a page is a single page that is in the core (/concrete directory).

public string
# getCollectionIcon( )

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

public integer
# removeThisAlias( )

Remove an external link/alias.

public
# populateRecursivePages( $pages, $pageRow, $cParentID, $level, $includeThisPage = true )
public
public
public
public
# queueForDeletionRequest( $queue = null, $includeThisPage = true )
public
# queueForDuplication( $destination, $includeParent = true )
public
# export( $pageNode, $includePublicDate = false )
public integer
# getCollectionCheckedOutUserID( )

Returns the uID for a page that is checked out.

public string
# getCollectionPath( )

Returns the path for the current page.

public
# getCollectionPathObject( )

Returns the PagePath object for the current page.

public
# addAdditionalPagePath( $cPath, $commit = true )

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

public
# setCanonicalPagePath( $cPath, $isAutoGenerated = false )

Sets the canonical page path for a page.

public
public
public
# clearPagePaths( )

Clears all page paths for a page.

public static string
# getCollectionPathFromID( integer $cID )

Returns the path for a page from its cID.

public integer
# getCollectionUserID( )

Returns the uID for a page ownder.

public string
# getCollectionHandle( )

Returns the page's handle.

public
# getCollectionTypeName( )
public
public
# getCollectionTypeID( )
public integer
# getPageTypeID( )

Returns the Collection Type ID.

public
public integer
# getPageTemplateID( )

Returns the Page Template ID.

public PageTemplate
# getPageTemplateObject( )

Returns the Page Template Object.

public string
# getPageTemplateHandle( )

Returns the Page Template handle.

public string
# getPageTypeHandle( )

Returns the Collection Type handle.

public
public integer
# getCollectionThemeID( )

Returns theme id for the collection.

public boolean
# isBlockAliasedFromMasterCollection( Block $b )

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

public PageTheme
# getCollectionThemeObject( )

Returns Collection's theme object.

public string
# getCollectionName( )

Returns the page's name.

public integer
# getCollectionPointerID( )

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

public boolean
# openCollectionPointerExternalLinkInNewWindow( )

Returns if the alias opens in a new window.

public boolean
# isAlias( )

Checks to see if the page is an alias.

public integer
# getCollectionPointerOriginalID( )

Get the original cID of a page.

public string
# getCollectionFilename( )

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

public string
# getCollectionDatePublic( )

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

public
public string
# getCollectionDescription( )

Get the description of a page.

public integer
# getCollectionParentID( )

Gets the cID of the page's parent.

public static integer
# getCollectionParentIDFromChildID( integer $cID )

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

public array
# getCollectionParentIDs( )

Returns an array of this cParentID and aliased parentIDs.

public boolean
# isMasterCollection( )

Checks if a page is a page default.

public string
# overrideTemplatePermissions( )

Gets the template permissions.

public integer
# getCollectionDisplayOrder( )

Gets the position of the page in the sitemap.

public
# setTheme( PageTheme $pl )

Set the theme for a page using the page object.

public
# setPageType( Concrete\Core\Page\Type\Type $type = null )

Set the theme for a page using the page object.

public
# setPermissionsInheritanceToTemplate( )

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

public
# setPermissionsInheritanceToOverride( )

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

public
public
public
public
public
# getMasterCollectionID( )

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

public
public
public
public Concrete\Core\Page\Page
# getFirstChild( string $sortColumn = 'cDisplayOrder asc', $excludeSystemPages = false )

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

public
# getCollectionChildrenArray( $oneLevelOnly = 0 )
public
# getCollectionChildren( )

Returns the immediate children of the current page.

protected
# _getNumChildren( $cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc' )
public
# canMoveCopyTo( $cobj )
public
public
public
public
# setCustomStyleObject( Concrete\Core\Page\Theme\Theme $pt, Concrete\Core\StyleCustomizer\Style\ValueList $valueList, $selectedPreset = false, $customCssRecord = false )
public
public
public static
public
# update( $data )
public
public
public
public
public
public
# setOverrideTemplatePermissions( $cOverrideTemplatePermissions )
public
# updatePermissionsCollectionID( $cParentIDString, $npID )
public
# acquireAreaPermissions( $permissionsCollectionID )
public
# acquirePagePermissions( $permissionsCollectionID )
public
public
# updateGroupsSubCollection( $cParentIDString )
public
# addBlock( $bt, $a, $data )
public
# move( $nc )
public
# duplicateAll( $nc, $preserveUserID = false )
protected
# _duplicateAll( $cParent, $cNewParent, $preserveUserID = false )
public
# duplicate( $nc, $preserveUserID = false )
public
# delete( )
public
public
public
public
public
# generatePagePath( )

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

public
# 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.

public
# updateDisplayOrder( $do, $cID = 0 )
public
public
public
public
public
public
public
public
# activate( )
public
# isActive( )
public
# setPageIndexScore( $score )
public
public
protected
# _associateMasterCollectionBlocks( $newCID, $masterCID )
protected
# _associateMasterCollectionAttributes( $newCID, $masterCID )
public static page
# addHomePage( )

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

public page
# add( Concrete\Core\Page\Type\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.

protected
public
public
public
public
public
public
# addStatic( $data )
public static
public
# getTotalPageViews( $date = null )

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

public
public
public
# getPageStatistics( $limit = 20 )

Gets a pages statistics.

Properties summary

protected $controller
#
protected $blocksAliasedFromMasterCollection
# null
protected boolean $cIsSystemPage
# false
protected $cPointerOriginalID
# null