This class embodies a group of StructuredText blocks. This is only for internal use, when a StructuredText fragment gets rendered as HTML: the first thing that happens is that StructuredText blocks get grouped together, so that list-items can later be serialized with a
and a after, for instance. This is the data structure that allows that temporary storage.
§ __construct()
| Prismic\Fragment\BlockGroup::__construct |
( |
|
$maybeTag, |
|
|
|
$blocks |
|
) |
| |
Constructs a group of StructuredText blocks
- Parameters
-
| string | $maybeTag | the tag to use if should be (values are either "ul", "ol" or null) |
| array | $blocks | the array of BlockInterface objects that are being grouped here |
§ addBlock()
| Prismic\Fragment\BlockGroup::addBlock |
( |
|
$block | ) |
|
Adds a block to the group of blocks.
- Parameters
-
| \Prismic\Fragment\Block\BlockInterface | $block | the block to add |
§ asHtml()
| Prismic\Fragment\BlockGroup::asHtml |
( |
|
$linkResolver = null | ) |
|
Supposedly, should render the group as HTML; really, returns null, as there's no reason to render it as HTML.
- Parameters
-
| \Prismic\LinkResolver | $linkResolver | a link resolver |
- Returns
- string null in all cases
§ asText()
| Prismic\Fragment\BlockGroup::asText |
( |
| ) |
|
Supposedly, should render the group as text; really, returns null, as there's no reason to render it as text.
- Returns
- string null in all cases
§ getBlocks()
| Prismic\Fragment\BlockGroup::getBlocks |
( |
| ) |
|
Returns the array of BlockInterface objects that are being grouped here
- Returns
- array the array of BlockInterface objects that are being grouped here
§ getTag()
| Prismic\Fragment\BlockGroup::getTag |
( |
| ) |
|
Returns the tag to use if should be (values are either "ul", "ol" or null).
- Returns
- string the tag to use if should be (values are either "ul", "ol" or null).
The documentation for this class was generated from the following file:
- src/Prismic/Fragment/BlockGroup.php