Functionality of a dock_board can be extended by supplying one or more
dock_extension objects, which essentially provide UI shown in a dock panel
that allows for manipulating the board state. A set of dock extensions
can be combined into a dock_extensions object.
new_dock_extension(
server,
ui,
name,
class,
ctor = sys.parent(),
pkg = NULL,
options = new_board_options(),
...
)is_dock_extension(x)
validate_extension(x, ...)
extension_ui(x, id, ...)
extension_server(x, ...)
extension_id(x)
extension_name(x)
extension_ctor(x)
new_dock_extensions(x = list())
is_dock_extensions(x)
validate_extensions(x)
as_dock_extensions(x, ...)
# S3 method for dock_extensions
as_dock_extensions(x, ...)
# S3 method for dock_extension
as_dock_extensions(x, ...)
# S3 method for list
as_dock_extensions(x, ...)
extension_block_callback(x, ...)
The constructors new_dock_extension() and new_dock_extension(),
as do the coercion function as_dock_extension() and as_dock_extension(),
return objects that inherit from dock_extension and dock_extensions
respectively. This inheritance structure can be checked using
is_dock_extension() and is_dock_extensions(), which both return a
boolean. A dock_extension can be validated using validate_extension()
and a dock_extensions object using validate_extensions(), which return
the input object invisibly and throw errors as side-effects. Several getter
functions return extension attributes, including extension_ui() (a
function), extension_server() (a function), extension_id() (a string),
extension_name() (a string) and extension_ctor() (an object that
inherits from blockr_ctor).
A function returning shiny::moduleServer()
A function with a single argument (ns) returning a shiny.tag
Name for extension
Extension subclass
Constructor function name
Package to look up ctor
Board options supplied by an extension
Further attributes
Extension object
Namespace ID
ext <- new_edit_board_extension()
is_dock_extension(ext)
Run the code above in your browser using DataLab