GlobalArea
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
No description
The constructor is used primarily on page templates to create areas of content that are editable within the cms.
No description
No description
No description
check if the area has permissions that override the page's permissions.
Sets the total number of blocks an area allows. Does not limit by type.
No description
Gets the Area object for the given page and area handle.
Get all of the blocks within the current area for a given page.
This function removes all permissions records for the current Area and sets it to inherit from the Page permissions.
Rescans the current Area's permissions ensuring that it's inheriting permissions properly up the chain.
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.
similar to rescanSubAreaPermissions, but for those who have setup their pages to inherit master collection permissions.
No description
displays the Area in the page ex: $a = new Area('Main'); $a->display($c);.
Specify HTML to automatically print before blocks contained within the area.
Set HTML that automatically prints after any blocks contained within the area.
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');.
returns an array of custom templates defined for this Area object.
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.
No description
Note that this function does not delete the global area's stack.
Details
loadError($error)
No description
isError()
No description
getError()
No description
setPropertiesFromArray($arr)
No description
static
camelcase($file)
No description
static
uncamelcase($string)
No description
in
Area at line 109
setAreaDisplayName(string $arDisplayName)
No description
in
Area at line 119
bool
showControls()
Returns whether or not controls are to be displayed.
in
Area at line 133
forceControlsToDisplay()
Force enables controls to show.
in
Area at line 141
setAreaGridMaximumColumns(int $cspan)
No description
in
Area at line 151
int|null
getAreaGridMaximumColumns()
No description
in
Area at line 176
final
enableGridContainer()
Enable Grid containers.
in
Area at line 184
bool
isGridContainerEnabled()
No description
string
getAreaDisplayName()
No description
in
Area at line 209
__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.
in
Area at line 217
getPermissionObjectIdentifier()
No description
in
Area at line 225
getPermissionResponseClassName()
No description
in
Area at line 233
getPermissionAssignmentClassName()
No description
in
Area at line 241
getPermissionObjectKeyCategoryHandle()
No description
in
Area at line 251
int
getCollectionID()
returns the Collection's cID.
in
Area at line 263
Page
getAreaCollectionObject()
returns the Collection object for the current Area.
bool
isGlobalArea()
No description
in
Area at line 283
int
getAreaID()
returns the arID of the current area.
in
Area at line 293
string
getAreaHandle()
returns the handle for the current area.
int
getTotalBlocksInArea(Page $c = false)
No description
int
getTotalBlocksInAreaEditMode()
No description
in
Area at line 359
bool
overrideCollectionPermissions()
check if the area has permissions that override the page's permissions.
in
Area at line 367
int
getAreaCollectionInheritID()
No description
in
Area at line 377
setBlockLimit(int $num)
Sets the total number of blocks an area allows. Does not limit by type.
in
Area at line 385
disableControls()
disables controls for the current area.
in
Area at line 395
int
getMaximumBlocks()
gets the maximum allowed number of blocks, -1 if unlimited.
in
Area at line 406
string
getAreaUpdateAction(string $task = 'update', null $alternateHandler = null)
No description
in
Area at line 424
refreshCache(Page $c)
No description
in
Area at line 439
final static Area
get(Page $c, string $arHandle)
Gets the Area object for the given page and area handle.
Area
create(Page $c, string $arHandle)
No description
in
Area at line 510
static string
getAreaHandleFromID($arID)
No description
in
Area at line 534
Block[]
getAreaBlocksArray(Page|bool $c = false)
Get all of the blocks within the current area for a given page.
in
Area at line 551
static array
getHandleList()
Gets a list of all areas.
in
Area at line 571
static Area[]
getListOnPage(Page $c)
No description
in
Area at line 599
revertToPagePermissions()
This function removes all permissions records for the current Area and sets it to inherit from the Page permissions.
in
Area at line 625
__destruct()
No description
in
Area at line 635
bool
rescanAreaPermissionsChain()
Rescans the current Area's permissions ensuring that it's inheriting permissions properly up the chain.
in
Area at line 709
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.
in
Area at line 745
bool
rescanSubAreaPermissionsMasterCollection(Page $masterCollection)
similar to rescanSubAreaPermissions, but for those who have setup their pages to inherit master collection permissions.
in
Area at line 770
static Area
getOrCreate(Page $c, string $arHandle)
No description
in
Area at line 784
load(Page $c)
No description
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);.
in
Area at line 895
export(SimpleXMLElement $p, Page $page)
Exports the area to content format.
in
Area at line 917
setBlockWrapperStart(string $html)
Specify HTML to automatically print before blocks contained within the area.
in
Area at line 927
setBlockWrapperEnd(string $html)
Set HTML that automatically prints after any blocks contained within the area.
in
Area at line 932
overridePagePermissions()
No description
in
Area at line 972
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');.
in
Area at line 982
array
getAreaCustomTemplates()
returns an array of custom templates defined for this Area object.
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
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.