PHP Class BlockManager

Author: Shea Dawson ([email protected])
Inheritance: extends Object
Mostra file Open project: sheadawson/silverstripe-blocks Class Usage Examples

Public Methods

Method Description
__construct ( )
getAreasForPageType ( string $class ) : array Gets an array of all areas defined for the current theme that are compatible with pages of type $class.
getAreasForTheme ( string $theme = null, boolean $keyAsValue = true ) : array Gets an array of all areas defined for the current theme.
getBlackListedPageTypes ( ) * getBlackListedPageTypes optionally configured by the developer Includes blacklisted page types defined in the old exclude_from_page_types array
getBlockClasses ( )
getExcludeFromPageTypes ( ) * Exclusion of blocks from page types defined in yaml
getPrefixDefaultCSSClasses ( ) * Prefix for the default CSSClasses
getUseBlockSets ( ) * Usage of BlockSets configurable from yaml
getUseExtraCSSClasses ( ) * Usage of extra css classes configurable from yaml
getWhiteListedPageTypes ( ) * getWhiteListedPageTypes optionally configured by the developer

Private Methods

Method Description
getTheme ( ) * Get the current/active theme or 'default' to support theme-less sites
getThemeConfig ( ) * Get the block config for the current theme

Method Details

__construct() public method

public __construct ( )

getAreasForPageType() public method

Gets an array of all areas defined for the current theme that are compatible with pages of type $class.
public getAreasForPageType ( string $class ) : array
$class string
return array $areas

getAreasForTheme() public method

Gets an array of all areas defined for the current theme.
public getAreasForTheme ( string $theme = null, boolean $keyAsValue = true ) : array
$theme string
$keyAsValue boolean
return array $areas

getBlackListedPageTypes() public method

* getBlackListedPageTypes optionally configured by the developer Includes blacklisted page types defined in the old exclude_from_page_types array

getBlockClasses() public method

public getBlockClasses ( )

getExcludeFromPageTypes() public method

* Exclusion of blocks from page types defined in yaml

getPrefixDefaultCSSClasses() public method

* Prefix for the default CSSClasses

getUseBlockSets() public method

* Usage of BlockSets configurable from yaml
public getUseBlockSets ( )

getUseExtraCSSClasses() public method

* Usage of extra css classes configurable from yaml

getWhiteListedPageTypes() public method

* getWhiteListedPageTypes optionally configured by the developer