This class represents a basic content unit in a report, such as text, images, or other multimedia elements. It serves as a foundation for constructing complex report structures.
Methods
Method new()
Initialize a ContentBlock
object.
Usage
ContentBlock$new()
Examples
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
ContentBlock$new()
Method set_content()
Sets content of this ContentBlock
.
Examples
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
block <- ContentBlock$new()
block$set_content("Base64 encoded picture")
Method get_content()
Retrieves the content assigned to this block.
Examples
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
block <- ContentBlock$new()
block$get_content()
Method from_list()
Create the ContentBlock
from a list.
Examples
## ------------------------------------------------
## Method `ContentBlock$new`
## ------------------------------------------------
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
ContentBlock$new()
#> <ContentBlock>
#> Public:
#> clone: function (deep = FALSE)
#> from_list: function (x)
#> get_content: function ()
#> initialize: function ()
#> set_content: function (content)
#> to_list: function ()
#> Private:
#> content:
#> deep_clone: function (name, value)
## ------------------------------------------------
## Method `ContentBlock$set_content`
## ------------------------------------------------
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
block <- ContentBlock$new()
block$set_content("Base64 encoded picture")
## ------------------------------------------------
## Method `ContentBlock$get_content`
## ------------------------------------------------
ContentBlock <- getFromNamespace("ContentBlock", "teal.reporter")
block <- ContentBlock$new()
block$get_content()
#> character(0)