Class Area

Concrete\Core\Foundation\Object
Extended by Concrete\Core\Area\Area implements Concrete\Core\Permission\ObjectInterface
Namespace: Concrete\Core\Area
Located at src/Area/Area.php

Methods summary

public
# setAreaDisplayName( string $arDisplayName )
public boolean
# showControls( )

Returns whether or not controls are to be displayed.

public
# forceControlsToDisplay( )

Force enables controls to show.

public
# setAreaGridMaximumColumns( integer $cspan )
public integer|null
# getAreaGridMaximumColumns( )
final public
# enableGridContainer( )

Enable Grid containers.

public boolean
# isGridContainerEnabled( )
public string
# getAreaDisplayName( )
public
# __construct( string $arHandle )

The constructor is used primarily on page templates to create areas of content that are editable within the cms. ex: $a = new Area('Main'); $a->display($c) We actually use Collection::getArea() when we want to interact with a fully qualified Area object when dealing with a Page/Collection object.

public string
public string
public string
public string
public integer
# getCollectionID( )

returns the Collection's cID.

public Page
# getAreaCollectionObject( )

returns the Collection object for the current Area.

public boolean
# isGlobalArea( )

whether or not it's a global area.

public integer
# getAreaID( )

returns the arID of the current area.

public string
# getAreaHandle( )

returns the handle for the current area.

public
# getTotalBlocksInArea( Page $c = false )

Returns the total number of blocks in an area.

public
# getTotalBlocksInAreaEditMode( )

Returns the amount of actual blocks in the area, does not exclude core blocks or layouts, does not recurse.

public boolean
# overrideCollectionPermissions( )

check if the area has permissions that override the page's permissions.

public integer
# getAreaCollectionInheritID( )
public
# setBlockLimit( integer $num )

Sets the total number of blocks an area allows. Does not limit by type.

public
# disableControls( )

disables controls for the current area.

public integer
# getMaximumBlocks( )

gets the maximum allowed number of blocks, -1 if unlimited.

public string
# getAreaUpdateAction( string $task = 'update', null $alternateHandler = null )
public
# refreshCache( Page $c )
final public static Concrete\Core\Area\Area
# get( Page $c, string $arHandle )

Gets the Area object for the given page and area handle.

public Concrete\Core\Area\Area
# create( Page $c, string $arHandle )

Creates an area in the database. I would like to make this static but PHP pre 5.3 sucks at this stuff.

public static string
# getAreaHandleFromID( $arID )
public Block[]
# getAreaBlocksArray( Page|boolean $c = false )

Get all of the blocks within the current area for a given page.

public static array
# getHandleList( )

Gets a list of all areas.

public static Concrete\Core\Area\Area[]
# getListOnPage( Page $c )
public
# revertToPagePermissions( )

This function removes all permissions records for the current Area and sets it to inherit from the Page permissions.

public
public boolean
# rescanAreaPermissionsChain( )

Rescans the current Area's permissions ensuring that it's inheriting permissions properly up the chain.

public
# rescanSubAreaPermissions( integer $cIDToCheck = null )

works a lot like rescanAreaPermissionsChain() but it works down. This is typically only called when we update an area to have specific permissions, and all areas that are on pagesbelow it with the same handle, etc... should now inherit from it.

public boolean
# rescanSubAreaPermissionsMasterCollection( Page $masterCollection )

similar to rescanSubAreaPermissions, but for those who have setup their pages to inherit master collection permissions.

public static Concrete\Core\Area\Area
# getOrCreate( Page $c, string $arHandle )
public
# load( Page $c )
protected Block[]
# getAreaBlocks( )
public boolean
# display( Page $c = false, Block[] $alternateBlockArray = null )

displays the Area in the page ex: $a = new Area('Main'); $a->display($c);.

public
# export( SimpleXMLElement $p, Page $page )

Exports the area to content format.

public
# setBlockWrapperStart( string $html )

Specify HTML to automatically print before blocks contained within the area.

public
# setBlockWrapperEnd( string $html )

Set HTML that automatically prints after any blocks contained within the area.

public
public
# setCustomTemplate( string $btHandle, string $view )

Sets a custom block template for blocks of a type specified by the btHandle Note, these can be stacked. For example $a->setCustomTemplate('image', 'banner'); $a->setCustomTemplate('content', 'masthead_content');.

public array
# getAreaCustomTemplates( )

returns an array of custom templates defined for this Area object.

Properties summary

public integer $cID
#
public integer $arID
#
public string $arHandle
#
public Page $c
#
public integer $maximumBlocks

limits the number of blocks in the area.

# -1
protected boolean $showControls
# -1
public string $enclosingStart
# ''
public string $enclosingEnd
# ''
public Block[] $areaBlocksArray

Array of Blocks within the current area.

# array()
protected boolean $arIsLoaded
# false
protected boolean $arUseGridContainer
# false
protected string $arDisplayName
#
protected integer $arGridMaximumColumns
#
protected boolean $arOverrideCollectionPermissions
#
protected integer $arInheritPermissionsFromAreaOnCID
#
protected array $arCustomTemplates
# array()

Properties inherited from Concrete\Core\Foundation\Object

$error