class GlobalArea extends Area (View source)

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 $ignoreCurrentMultilingualLanguageSection

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

__construct($arHandle)

The constructor is used primarily on page templates to create areas of content that are editable within the cms.

from  Area
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()

No description

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)

No description

int
getTotalBlocksInAreaEditMode()

No description

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
string
getAreaUpdateAction(string $task = 'update', null $alternateHandler = null)

No description

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

bool
display(Page $c = false, $fake = null)

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

export(SimpleXMLElement $p, Page $page)

Exports the area to content format.

from  Area
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()

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

from  Area
ignoreCurrentLanguageSection()

If called on a multilingual website, this global area will not load its content from the language-specific global area stack. Instead, it'll use the stack in the default language, throughout the website.

Page
getGlobalAreaStackObject(Page $c = false)

No description

static 
deleteByName(string $arHandle)

Note that this function does not delete the global area's stack.

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)

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.

Parameters

$arHandle

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()

No description

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)

No description

Parameters

Page $c

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

Return Value

int

int getTotalBlocksInAreaEditMode()

No description

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

string getAreaUpdateAction(string $task = 'update', null $alternateHandler = null)

No description

Parameters

string $task
null $alternateHandler

Return Value

string

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

Block[] getAreaBlocks()

No description

Return Value

Block[]

bool display(Page $c = false, $fake = null)

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

Parameters

Page $c
$fake

Return Value

bool

export(SimpleXMLElement $p, Page $page)

Exports the area to content format.

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()

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

Return Value

array

ignoreCurrentLanguageSection()

If called on a multilingual website, this global area will not load its content from the language-specific global area stack. Instead, it'll use the stack in the default language, throughout the website.

protected Page getGlobalAreaStackObject(Page $c = false)

No description

Parameters

Page $c

Return Value

Page

static deleteByName(string $arHandle)

Note that this function does not delete the global area's stack.

You probably want to call the "delete" method of the Stack model instead.

Parameters

string $arHandle