This interface embodies any block of a StructuredText fragment that contains text. Its known implementations are HeadingBlock, ListItemBlock, ParagraphBlock, and PreformattedBlock.
§ __construct()
| Prismic\Fragment\Block\TextBlock::__construct |
( |
|
$text, |
|
|
|
$spans, |
|
|
|
$label = NULL |
|
) |
| |
Constructs a paragraph block.
- Parameters
-
| string | $text | the unformatted text |
| array | $spans | an array of objects that contain the formatting (em, strong, links, ...) |
| $label | string |
§ getLabel()
| Prismic\Fragment\Block\TextBlock::getLabel |
( |
| ) |
|
Returns the label
- Returns
- string the label
§ getSpans()
| Prismic\Fragment\Block\TextBlock::getSpans |
( |
| ) |
|
Returns the formatting (em, strong, links, ...)
- Returns
- array an array of objects that contain the formatting
§ getText()
| Prismic\Fragment\Block\TextBlock::getText |
( |
| ) |
|
Returns the unformatted text.
- Returns
- string the unformatted text.
The documentation for this class was generated from the following file:
- src/Prismic/Fragment/Block/TextBlock.php