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.
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
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.
Note that this function does not delete the global area's stack.
Searches for global areas without any blocks in it and deletes them.
No description
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 110
                            
    setAreaDisplayName(string $arDisplayName)
        
    
    No description
        in 
Area at line 120
                            bool
    showControls()
        
    
    Returns whether or not controls are to be displayed.
        in 
Area at line 134
                            
    forceControlsToDisplay()
        
    
    Force enables controls to show.
        in 
Area at line 142
                            
    setAreaGridMaximumColumns(int $cspan)
        
    
    No description
        in 
Area at line 152
                            int|null
    getAreaGridMaximumColumns()
        
    
    No description
        in 
Area at line 177
        final                    
    enableGridContainer()
        
    
    Enable Grid containers.
        in 
Area at line 185
                            bool
    isGridContainerEnabled()
        
    
    No description
        
                            string
    getAreaDisplayName()
        
    
    No description
        in 
Area at line 210
                            
    __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 222
                            
    getPermissionObjectIdentifier()
        
    
    No description
        in 
Area at line 230
                            
    getPermissionResponseClassName()
        
    
    No description
        in 
Area at line 238
                            
    getPermissionAssignmentClassName()
        
    
    No description
        in 
Area at line 246
                            
    getPermissionObjectKeyCategoryHandle()
        
    
    No description
        in 
Area at line 256
                            int
    getCollectionID()
        
    
    returns the Collection's cID.
        in 
Area at line 268
                            Page
    getAreaCollectionObject()
        
    
    returns the Collection object for the current Area.
        
                            bool
    isGlobalArea()
        
    
    No description
        in 
Area at line 288
                            int
    getAreaID()
        
    
    returns the arID of the current area.
        in 
Area at line 298
                            string
    getAreaHandle()
        
    
    returns the handle for the current area.
        
                            int
    getTotalBlocksInArea(Page $c = false)
        
    
    No description
        
                            int
    getTotalBlocksInAreaEditMode()
        
    
    No description
        in 
Area at line 364
                            bool
    overrideCollectionPermissions()
        
    
    check if the area has permissions that override the page's permissions.
        in 
Area at line 372
                            int
    getAreaCollectionInheritID()
        
    
    No description
        in 
Area at line 382
                            
    setBlockLimit(int $num)
        
    
    Sets the total number of blocks an area allows. Does not limit by type.
        in 
Area at line 390
                            
    disableControls()
        
    
    disables controls for the current area.
        in 
Area at line 400
                            int
    getMaximumBlocks()
        
    
    gets the maximum allowed number of blocks, -1 if unlimited.
        in 
Area at line 408
                            
    refreshCache(Page $c)
        
    
    No description
        in 
Area at line 423
        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 494
                static            string
    getAreaHandleFromID($arID)
        
    
    No description
        in 
Area at line 518
                            Block[]
    getAreaBlocksArray(Page|bool $c = false)
        
    
    Get all of the blocks within the current area for a given page.
        in 
Area at line 535
                static            array
    getHandleList()
        
    
    Gets a list of all areas.
        in 
Area at line 554
                static            Area[]
    getListOnPage(Page $c)
        
    
    No description
        in 
Area at line 582
                            
    revertToPagePermissions()
        
    
    This function removes all permissions records for the current Area and sets it to inherit from the Page permissions.
        in 
Area at line 608
                            
    __destruct()
        
    
    No description
        in 
Area at line 618
                            bool
    rescanAreaPermissionsChain()
        
    
    Rescans the current Area's permissions ensuring that it's inheriting permissions properly up the chain.
        in 
Area at line 692
                            
    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 728
                            bool
    rescanSubAreaPermissionsMasterCollection(Page $masterCollection)
        
    
    similar to rescanSubAreaPermissions, but for those who have setup their pages to inherit master collection permissions.
        in 
Area at line 753
                static            Area
    getOrCreate(Page $c, string $arHandle)
        
    
    No description
        in 
Area at line 767
                            
    load(Page $c)
        
    
    No description
        
                            Block[]
    getAreaBlocks()
        
    
    No description
        
                            bool
    display(Page|bool $c = false, $fake = null)
        
    
    displays the Area in the page ex: $a = new Area('Main'); $a->display($c);.
        in 
Area at line 879
                            
    export(SimpleXMLElement $p, Page $page)
        
    
    Exports the area to content format.
        in 
Area at line 901
                            
    setBlockWrapperStart(string $html)
        
    
    Specify HTML to automatically print before blocks contained within the area.
        in 
Area at line 911
                            
    setBlockWrapperEnd(string $html)
        
    
    Set HTML that automatically prints after any blocks contained within the area.
        in 
Area at line 916
                            
    overridePagePermissions()
        
    
    No description
        in 
Area at line 956
                            
    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 966
                            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.
        
                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.
        
                static            
    deleteEmptyAreas()
        
    
    Searches for global areas without any blocks in it and deletes them.
This will have a positive impact on the performance as every global area is rendered for every page.
        
                    protected        Page
    getGlobalAreaStackObject(Page $c = false)
        
    
    No description