Class JBlock
Define a JBlock block to be displayed into a JBlocks.
- Defined in: jblocks.block.jblock.js
- Extends Block
Constructor Attributes | Constructor Name and Description |
---|---|
JBlock()
A JBlock block holds a JBlocks viewport. |
Method Summary
Class Detail
JBlock()
A JBlock block holds a JBlocks viewport. It is used to create more complex blocks made of sub-blocks, for instance with a header, content and footer areas.
The constructor should not be invoked directly but JBlocks#newBlock or JBlocks#addNewBlock should be used instead.
Field Detail
selfJBlock
Access the inner JBlocks object.
Method Detail
-
addNewBlock(blockClass, layout, options)
- Parameters:
- {String} blockClass
- the class the new block is an instance of.
- {Object} layout
- the layout for the new block.
- {Object} options
- for the new block. The options fields depends on the block class being instantiated.
- Returns:
- the newly created Block object.
-
init(layout, options)Initializes a Foo block. The method is invoked by the jBlocks core and must never be called directly.
- Parameters:
- {Object} layout Optional
- see Block#init
- {Object} options Optional
- in addition to base class options Block#init:
- {String} options.jBlocksBlockClass Optional
- the blockClass option for the inner jBlocks.
- {String} options.jBlocksBlockContentClass Optional
- the blockContentClass option for the inner jBlocks.