Area
class Area extends ConcreteObject implements ObjectInterface (View source)
Properties
| $error | from ConcreteObject | ||
| int | $cID | ||
| int | $arID | ||
| string | $arHandle | ||
| Page | $c | ||
| int | $maximumBlocks | limits the number of blocks in the area. | |
| protected bool | $showControls | ||
| string | $enclosingStart | ||
| string | $enclosingEnd | ||
| Block[] | $areaBlocksArray | Array of Blocks within the current area. | |
| protected bool | $arIsLoaded | ||
| protected bool | $arUseGridContainer | ||
| protected string | $arDisplayName | ||
| protected int | $arGridMaximumColumns | ||
| protected bool | $arOverrideCollectionPermissions | ||
| protected int | $arInheritPermissionsFromAreaOnCID | ||
| protected array | $arCustomTemplates | 
Methods
No description
Returns whether or not controls are to be displayed.
Force enables controls to show.
No description
No description
Enable Grid containers.
No description
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
No description
returns the Collection's cID.
returns the Collection object for the current Area.
whether or not it's a global area.
returns the arID of the current area.
returns the handle for the current area.
Returns the total number of blocks in an area.
Returns the amount of actual blocks in the area, does not exclude core blocks or layouts, does not recurse.
check if the area has permissions that override the page's permissions.
No description
Sets the total number of blocks an area allows. Does not limit by type.
disables controls for the current area.
gets the maximum allowed number of blocks, -1 if unlimited.
No description
Creates an area in the database. I would like to make this static but PHP pre 5.3 sucks at this stuff.
No description
Get all of the blocks within the current area for a given page.
Gets a list of all areas.
No description
This function removes all permissions records for the current Area and sets it to inherit from the Page permissions.
No description
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
No description
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.
No description
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.
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
        
                            
    setAreaDisplayName(string $arDisplayName)
        
    
    No description
        
                            bool
    showControls()
        
    
    Returns whether or not controls are to be displayed.
        
                            
    forceControlsToDisplay()
        
    
    Force enables controls to show.
        
                            
    setAreaGridMaximumColumns(int $cspan)
        
    
    No description
        
                            int|null
    getAreaGridMaximumColumns()
        
    
    No description
        
        final                    
    enableGridContainer()
        
    
    Enable Grid containers.
        
                            bool
    isGridContainerEnabled()
        
    
    No description
        
                            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.
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.
        
                            
    getPermissionObjectIdentifier()
        
    
    No description
        
                            
    getPermissionResponseClassName()
        
    
    No description
        
                            
    getPermissionAssignmentClassName()
        
    
    No description
        
                            
    getPermissionObjectKeyCategoryHandle()
        
    
    No description
        
                            int
    getCollectionID()
        
    
    returns the Collection's cID.
        
                            Page
    getAreaCollectionObject()
        
    
    returns the Collection object for the current Area.
        
                            bool
    isGlobalArea()
        
    
    whether or not it's a global area.
        
                            int
    getAreaID()
        
    
    returns the arID of the current area.
        
                            string
    getAreaHandle()
        
    
    returns the handle for the current area.
        
                            int
    getTotalBlocksInArea(Page $c = false)
        
    
    Returns the total number of blocks in an area.
        
                            int
    getTotalBlocksInAreaEditMode()
        
    
    Returns the amount of actual blocks in the area, does not exclude core blocks or layouts, does not recurse.
        
                            bool
    overrideCollectionPermissions()
        
    
    check if the area has permissions that override the page's permissions.
        
                            int
    getAreaCollectionInheritID()
        
    
    No description
        
                            
    setBlockLimit(int $num)
        
    
    Sets the total number of blocks an area allows. Does not limit by type.
        
                            
    disableControls()
        
    
    disables controls for the current area.
        
                            int
    getMaximumBlocks()
        
    
    gets the maximum allowed number of blocks, -1 if unlimited.
        
                            
    refreshCache(Page $c)
        
    
    No description
        
        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)
        
    
    Creates an area in the database. I would like to make this static but PHP pre 5.3 sucks at this stuff.
        
                static            string
    getAreaHandleFromID($arID)
        
    
    No description
        
                            Block[]
    getAreaBlocksArray(Page|bool $c = false)
        
    
    Get all of the blocks within the current area for a given page.
        
                static            array
    getHandleList()
        
    
    Gets a list of all areas.
        
                static            Area[]
    getListOnPage(Page $c)
        
    
    No description
        
                            
    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.
        
                            
    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.
        
                            bool
    rescanSubAreaPermissionsMasterCollection(Page $masterCollection)
        
    
    similar to rescanSubAreaPermissions, but for those who have setup their pages to inherit master collection permissions.
        
                static            Area
    getOrCreate(Page $c, string $arHandle)
        
    
    No description
        
                            
    load(Page $c)
        
    
    No description
        
                    protected        Block[]
    getAreaBlocks()
        
    
    No description
        
                            bool
    display(Page|bool $c = false, Block[] $alternateBlockArray = 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.
        
                            
    setBlockWrapperStart(string $html)
        
    
    Specify HTML to automatically print before blocks contained within the area.
        
                            
    setBlockWrapperEnd(string $html)
        
    
    Set HTML that automatically prints after any blocks contained within the area.
        
                            
    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');.
        
                            array
    getAreaCustomTemplates()
        
    
    returns an array of custom templates defined for this Area object.