PHP Class BlocksSiteTreeExtension

Author: Shea Dawson ([email protected])
Inheritance: extends SiteTreeExtension
显示文件 Open project: sheadawson/silverstripe-blocks

Public Properties

Property Type Description
$blockManager
$many_many_extraFields

Public Methods

Method Description
BlockArea ( string $area, integer $limit = null ) Called from templates to get rendered blocks for the given area.
HasBlockArea ( $area )
areasPreviewButton ( ) : string Get's html for a block area preview button.
areasPreviewLink ( ) : string Get's the link for a block area preview button.
getAppliedSets ( ) : ArrayList Get Any BlockSets that apply to this page.
getBlockList ( string | null $area = null, boolean $includeDisabled = false ) : ArrayList Get a merged list of all blocks on this page and ones inherited from BlockSets.
getBlocksFromAppliedBlockSets ( $area = null, $includeDisabled = false ) : ArrayList Get all Blocks from BlockSets that apply to this page.
showBlocksFields ( ) : boolean Check if the Blocks CMSFields should be displayed for this Page
updateCMSFields ( FieldList $fields ) Block manager for Pages.

Method Details

BlockArea() public method

Called from templates to get rendered blocks for the given area.
public BlockArea ( string $area, integer $limit = null )
$area string
$limit integer Limit the items to this number, or null for no limit

HasBlockArea() public method

public HasBlockArea ( $area )

areasPreviewButton() public method

Get's html for a block area preview button.
public areasPreviewButton ( ) : string
return string

getAppliedSets() public method

Get Any BlockSets that apply to this page.
public getAppliedSets ( ) : ArrayList
return ArrayList

getBlockList() public method

Get a merged list of all blocks on this page and ones inherited from BlockSets.
public getBlockList ( string | null $area = null, boolean $includeDisabled = false ) : ArrayList
$area string | null filter by block area
$includeDisabled boolean Include blocks that have been explicitly excluded from this page i.e. blocks from block sets added to the "disable inherited blocks" list
return ArrayList

getBlocksFromAppliedBlockSets() public method

Get all Blocks from BlockSets that apply to this page.
public getBlocksFromAppliedBlockSets ( $area = null, $includeDisabled = false ) : ArrayList
return ArrayList

showBlocksFields() public method

Check if the Blocks CMSFields should be displayed for this Page
public showBlocksFields ( ) : boolean
return boolean

updateCMSFields() public method

Block manager for Pages.
public updateCMSFields ( FieldList $fields )
$fields FieldList

Property Details

$blockManager public_oe property

public $blockManager

$many_many_extraFields public_oe static_oe property

public static $many_many_extraFields