This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Model_Page

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

Concrete5_Library_Object
Extended by Object
Extended by Concrete5_Model_Collection
Extended by Collection
Extended by Concrete5_Model_Page

Direct known subclasses

Page

Package: Pages
Located at core/models/page.php

Methods summary

public static Page
# getByPath( string $path, string $version = 'RECENT' )
public static Page
# getByID( integer $cID, string $version = 'RECENT', string $class = 'Page' )
protected
# populatePage( $cInfo, $where, $cvID )
public
public boolean
# isEditMode( )

Returns 1 if the page is 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
# processArrangement( array $areas, array $affectedAreaIDs = array() )

Takes an array of area/block values and makes that the arrangement for this page's version Format is like: $area[10][0] = 2, $area[10][1] = 8, $area[15][0] = 27, with the area ID being the key and the block IDs being 1-n values inside it

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 = Concrete5_Model_PermissionKey::ACCESS_TYPE_INCLUDE )
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 )
public integer
# getCollectionCheckedOutUserID( )

Returns the uID for a page that is checked out

public string
# getCollectionPath( )

Returns the path for the current 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 string
# getCollectionTypeName( )

Returns the page's name

public integer
# getCollectionTypeID( )

Returns the Collection Type ID

public string
# getCollectionTypeHandle( )

Returns the Collection Type handle

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( string $mask = null, string $type = 'system' )

Gets the date a the current version was made public, if user is specified, returns in the current user's timezone

public string
# getCollectionDescription( )

Get the description of a page

public integer
# getCollectionParentID( )

Gets the cID of the page's parent

public 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
# 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
public
public
public
public 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
# _getNumChildren( $cID, $oneLevelOnly = 0, $sortColumn = 'cDisplayOrder asc' )
public
# canMoveCopyTo( $cobj )
public
# update( $data )
public
# uniquifyPagePath( $origPath )
public
# rescanPagePaths( $newPaths )
public
public
public
public
public
public
# setOverrideTemplatePermissions( $cOverrideTemplatePermissions )
public
# updatePermissionsCollectionID( $cParentIDString, $npID )
public
# acquireAreaPermissions( $permissionsCollectionID )
public
# acquirePagePermissions( $permissionsCollectionID )
public
public
# updateGroupsSubCollection( $cParentIDString )
public
# move( $nc, $retainOldPagePath = false )
public
# duplicateAll( $nc, $preserveUserID = false )
public
# _duplicateAll( $cParent, $cNewParent, $preserveUserID = false )
public
# duplicate( $nc, $preserveUserID = false )
public
public
public
public
public
# rescanCollectionPath( $retainOldPagePath = false )
public
# updateDisplayOrder( $do, $cID = 0 )
public
public
public
# rescanCollectionPathIndividual( $cID, $cPath, $retainOldPagePath = false )
public
public
public
public
public
public
# activate( )
public
# isActive( )
public
# setPageIndexScore( $score )
public
public
public
public
public
# _associateMasterCollectionBlocks( $newCID, $masterCID )
public
# _associateMasterCollectionAttributes( $newCID, $masterCID )
public static page
# addHomePage( )

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

public page
# add( CollectionType $ct, array $data )

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

public
public
public
public
public
# addStatic( $data )
public
public static

Properties summary

protected $blocksAliasedFromMasterCollection
# null

Properties inherited from Concrete5_Model_Collection

$attributes, $cID

Properties inherited from Concrete5_Library_Object

$error