class SubArea extends Area (View source)

Constants

AREA_SUB_DELIMITER

Properties

$error from  ConcreteObject
int $cID from  Area
int $arID from  Area
string $arHandle from  Area
Page $c from  Area
int $maximumBlocks

limits the number of blocks in the area.

from  Area
protected bool $showControls from  Area
string $enclosingStart from  Area
string $enclosingEnd from  Area
Block[] $areaBlocksArray

Array of Blocks within the current area.

from  Area
protected bool $arIsLoaded from  Area
protected bool $arUseGridContainer from  Area
protected string $arDisplayName from  Area
protected int $arGridMaximumColumns from  Area
protected bool $arOverrideCollectionPermissions from  Area
protected int $arInheritPermissionsFromAreaOnCID from  Area
protected array $arCustomTemplates from  Area
protected Block $parentBlock

Methods

loadError($error)

No description

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

static 
camelcase($file)

No description

static 
uncamelcase($string)

No description

setAreaDisplayName(string $arDisplayName)

No description

from  Area
bool
showControls()

Returns whether or not controls are to be displayed.

from  Area
forceControlsToDisplay()

Force enables controls to show.

from  Area
setAreaGridMaximumColumns(int $cspan)

No description

from  Area
int|null
getAreaGridMaximumColumns()

No description

from  Area
enableGridContainer()

Enable Grid containers.

from  Area
bool
isGridContainerEnabled()

No description

from  Area
string
getAreaDisplayName()

No description

from  Area
__construct($arHandle, string $arParentHandle, int $arParentID)

No description

from  Area
from  Area
from  Area
int
getCollectionID()

returns the Collection's cID.

from  Area
Page
getAreaCollectionObject()

returns the Collection object for the current Area.

from  Area
bool
isGlobalArea()

whether or not it's a global area.

from  Area
int
getAreaID()

returns the arID of the current area.

from  Area
string
getAreaHandle()

returns the handle for the current area.

from  Area
int
getTotalBlocksInArea(Page $c = false)

Returns the total number of blocks in an area.

from  Area
int
getTotalBlocksInAreaEditMode()

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

from  Area
bool
overrideCollectionPermissions()

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

from  Area
int
getAreaCollectionInheritID()

No description

from  Area
setBlockLimit(int $num)

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

from  Area
disableControls()

disables controls for the current area.

from  Area
int
getMaximumBlocks()

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

from  Area
refreshCache(Page $c)

No description

from  Area
static Area
get(Page $c, string $arHandle)

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

from  Area
create(Page $c, string $arHandle)

No description

static string
getAreaHandleFromID($arID)

No description

from  Area
Block[]
getAreaBlocksArray(Page|bool $c = false)

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

from  Area
static array
getHandleList()

Gets a list of all areas.

from  Area
static Area[]
getListOnPage(Page $c)

No description

from  Area
revertToPagePermissions()

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

from  Area
__destruct()

No description

from  Area
bool
rescanAreaPermissionsChain()

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

from  Area
rescanSubAreaPermissions(int $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.

from  Area
bool
rescanSubAreaPermissionsMasterCollection(Page $masterCollection)

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

from  Area
static Area
getOrCreate(Page $c, string $arHandle)

No description

from  Area
load(Page $c)

No description

from  Area
Block[]
getAreaBlocks()

No description

from  Area
bool
display(Page|bool $c = false, Block[] $alternateBlockArray = null)

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

from  Area
export(SimpleXMLElement $p, Page $page)

No description

setBlockWrapperStart(string $html)

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

from  Area
setBlockWrapperEnd(string $html)

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

from  Area
overridePagePermissions()

No description

from  Area
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');.

from  Area
array
getAreaCustomTemplates($include_parent_templates = true)

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

setSubAreaBlockObject(Block $block)

No description

bool|Area|mixed|null
Block
getSubAreaBlockObject()

No description

int
getAreaParentID()

No description

delete()

No description

Details

loadError($error)

No description

Parameters

$error

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

Parameters

$arr

static camelcase($file)

No description

Parameters

$file

static uncamelcase($string)

No description

Parameters

$string

setAreaDisplayName(string $arDisplayName)

No description

Parameters

string $arDisplayName

bool showControls()

Returns whether or not controls are to be displayed.

Return Value

bool

forceControlsToDisplay()

Force enables controls to show.

setAreaGridMaximumColumns(int $cspan)

No description

Parameters

int $cspan

int|null getAreaGridMaximumColumns()

No description

Return Value

int|null

Exceptions

Exception

final enableGridContainer()

Enable Grid containers.

bool isGridContainerEnabled()

No description

Return Value

bool

string getAreaDisplayName()

No description

Return Value

string

__construct($arHandle, string $arParentHandle, int $arParentID)

No description

Parameters

$arHandle
string $arParentHandle
int $arParentID

getPermissionObjectIdentifier()

No description

getPermissionResponseClassName()

No description

getPermissionAssignmentClassName()

No description

getPermissionObjectKeyCategoryHandle()

No description

int getCollectionID()

returns the Collection's cID.

Return Value

int

Page getAreaCollectionObject()

returns the Collection object for the current Area.

Return Value

Page

bool isGlobalArea()

whether or not it's a global area.

Return Value

bool

int getAreaID()

returns the arID of the current area.

Return Value

int

string getAreaHandle()

returns the handle for the current area.

Return Value

string

int getTotalBlocksInArea(Page $c = false)

Returns the total number of blocks in an area.

Parameters

Page $c

must be passed if the display() method has not been run on the area object yet.

Return Value

int

int getTotalBlocksInAreaEditMode()

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

Return Value

int

bool overrideCollectionPermissions()

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

Return Value

bool

int getAreaCollectionInheritID()

No description

Return Value

int

setBlockLimit(int $num)

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

Parameters

int $num

disableControls()

disables controls for the current area.

int getMaximumBlocks()

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

Return Value

int

refreshCache(Page $c)

No description

Parameters

Page $c

final static Area get(Page $c, string $arHandle)

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

Parameters

Page $c
string $arHandle

Return Value

Area

Area create(Page $c, string $arHandle)

No description

Parameters

Page $c
string $arHandle

Return Value

Area

static string getAreaHandleFromID($arID)

No description

Parameters

$arID

Return Value

string

Block[] getAreaBlocksArray(Page|bool $c = false)

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

Parameters

Page|bool $c

Return Value

Block[]

static array getHandleList()

Gets a list of all areas.

Return Value

array

static Area[] getListOnPage(Page $c)

No description

Parameters

Page $c

Return Value

Area[]

revertToPagePermissions()

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

__destruct()

No description

bool rescanAreaPermissionsChain()

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

Return Value

bool

rescanSubAreaPermissions(int $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.

Parameters

int $cIDToCheck

bool rescanSubAreaPermissionsMasterCollection(Page $masterCollection)

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

Parameters

Page $masterCollection

Return Value

bool

See also

Area::rescanSubAreaPermissions

static Area getOrCreate(Page $c, string $arHandle)

No description

Parameters

Page $c
string $arHandle

Return Value

Area

load(Page $c)

No description

Parameters

Page $c

protected Block[] getAreaBlocks()

No description

Return Value

Block[]

bool display(Page|bool $c = false, Block[] $alternateBlockArray = null)

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

Parameters

Page|bool $c
Block[] $alternateBlockArray

optional array of blocks to render instead of default behavior

Return Value

bool

export(SimpleXMLElement $p, Page $page)

No description

Parameters

SimpleXMLElement $p
Page $page

setBlockWrapperStart(string $html)

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

Parameters

string $html

setBlockWrapperEnd(string $html)

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

Parameters

string $html

overridePagePermissions()

No description

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');.

Parameters

string $btHandle

handle for the block type

string $view

string identifying the block template ex: 'templates/breadcrumb.php'

array getAreaCustomTemplates($include_parent_templates = true)

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

Parameters

$include_parent_templates

Return Value

array

setSubAreaBlockObject(Block $block)

No description

Parameters

Block $block

bool|Area|mixed|null getSubAreaParentPermissionsObject()

No description

Return Value

bool|Area|mixed|null

Block getSubAreaBlockObject()

No description

Return Value

Block

int getAreaParentID()

No description

Return Value

int

delete()

No description