| ModStore | R Documentation |
This class is used to create a storage for tidymodules objects.
Manage applications, sessions and modules.
new()Create a new ModStore object. Should be called once by the TidyModule class. Not to be called directly outside TidyModule. The ModStore object can be retrieved from any TidyModule object, see example below.
ModStore$new()
A new ModStore object.
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
isStored()Check if a module is stored in the current session.
ModStore$isStored(m)
mTidyModule object.
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
s$isStored(m)
getGlobalSession()Retrieve the global session 'global_session'. This is the session that exists outside the application server function
ModStore$getGlobalSession()
getSession()Retrieve a module session. This could be the global session or a user session.
ModStore$getSession(m)
mTidyModule object.
getSessions()Retrieve all sessions.
ModStore$getSessions()
getMods()Retrieve all modules.
ModStore$getMods(m)
mTidyModule object.
getEdges()Retrieve modules connections.
ModStore$getEdges(m)
mTidyModule object.
addEdge()Add modules connections into ModStore. An edge is either a connection between a reactive object and a module or between two modules.
ModStore$addEdge(from, to, mode = "direct", comment = NA)
fromlist with three elements: m -> module, type -> input or output, port -> port Id.
tolist with three elements: m -> module, type -> input or output, port -> port Id.
modeThe type of edge, default to 'direct'.
commentAny additional comment.
delEdges()Remove module edges
ModStore$delEdges(m)
mTidyModule object.
addMod()Add module into the ModStore.
ModStore$addMod(m)
mTidyModule object.
delMod()Delete a module from the ModStore.
ModStore$delMod(m)
mTidyModule object.
print()Print the ModStore object.
ModStore$print()
clone()The objects of this class are cloneable with this method.
ModStore$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------
## Method `ModStore$new`
## ------------------------------------------------
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
## ------------------------------------------------
## Method `ModStore$isStored`
## ------------------------------------------------
MyModule <- R6::R6Class("MyModule", inherit = tidymodules::TidyModule)
m <- MyModule$new()
s <- m$getStore()
s$isStored(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.