Skip to content
Snippets Groups Projects
Commit 6c1ffd72 authored by jens.preussner's avatar jens.preussner :ghost:
Browse files

Merge branch 'get_set_methods' into 'master'

Getter and setter methods for title, author, datadir and theme

See merge request !10
parents a1e4feb7 fbf00358
No related branches found
No related tags found
1 merge request!10Getter and setter methods for title, author, datadir and theme
Pipeline #123404 passed
# Generated by roxygen2: do not edit by hand
export("%>%")
export("author<-")
export("datadir<-")
export("interactivity<-")
export("theme<-")
export("title<-")
export(add_colormap)
export(add_component)
export(add_page)
export(add_to_sidebar)
export(assemble)
export(author)
export(datadir)
export(embed_var)
export(i2dashboard)
export(interactivity)
export(remove_page)
export(theme)
export(title)
exportClasses(i2dashboard)
exportMethods(add_colormap)
exportMethods(add_component)
......
......@@ -19,4 +19,30 @@ setGeneric("add_colormap", function(dashboard, ...) standardGeneric("add_colorma
#' @export
setGeneric("interactivity", function(dashboard) standardGeneric("interactivity"))
#' @export
setGeneric("interactivity<-", function(dashboard, value) standardGeneric("interactivity<-"))
#' @export
setGeneric("title", function(dashboard) standardGeneric("title"))
#' @export
setGeneric("title<-", function(dashboard, value) standardGeneric("title<-"))
#' @export
setGeneric("author", function(dashboard) standardGeneric("author"))
#' @export
setGeneric("author<-", function(dashboard, value) standardGeneric("author<-"))
#' @export
setGeneric("theme", function(dashboard) standardGeneric("theme"))
#' @export
setGeneric("theme<-", function(dashboard, value) standardGeneric("theme<-"))
#' @export
setGeneric("datadir", function(dashboard) standardGeneric("datadir"))
#' @export
setGeneric("datadir<-", function(dashboard, value) standardGeneric("datadir<-"))
\ No newline at end of file
......@@ -13,3 +13,67 @@ setMethod("interactivity<-", "i2dashboard", function(dashboard, value) {
dashboard@interactive <- value
dashboard
})
#' Get/set the title of the i2dashboard.
#'
#' @param dashboard A \linkS4class{i2dash::i2dashboard}.
#' @param value The value of the desired property.
#'
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("title", "i2dashboard", function(dashboard) dashboard@title)
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("title<-", "i2dashboard", function(dashboard, value) {
dashboard@title <- value
dashboard
})
#' Get/set the author of the i2dashboard.
#'
#' @param dashboard A \linkS4class{i2dash::i2dashboard}.
#' @param value The value of the desired property.
#'
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("author", "i2dashboard", function(dashboard) dashboard@author)
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("author<-", "i2dashboard", function(dashboard, value) {
dashboard@author <- value
dashboard
})
#' Get/set the theme of the i2dashboard.
#'
#' @param dashboard A \linkS4class{i2dash::i2dashboard}.
#' @param value The value of the desired property.
#'
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("theme", "i2dashboard", function(dashboard) dashboard@theme)
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("theme<-", "i2dashboard", function(dashboard, value) {
dashboard@theme <- value
dashboard
})
#' Get/set the datadir of the i2dashboard.
#'
#' @param dashboard A \linkS4class{i2dash::i2dashboard}.
#' @param value The value of the desired property.
#'
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("datadir", "i2dashboard", function(dashboard) dashboard@datadir)
#' @name i2dashboard-class
#' @rdname i2dashboard-class
setMethod("datadir<-", "i2dashboard", function(dashboard, value) {
dashboard@datadir <- value
dashboard
})
......@@ -7,6 +7,22 @@
\S4method{interactivity}{i2dashboard}(dashboard)
\S4method{interactivity}{i2dashboard}(dashboard) <- value
\S4method{title}{i2dashboard}(dashboard)
\S4method{title}{i2dashboard}(dashboard) <- value
\S4method{author}{i2dashboard}(dashboard)
\S4method{author}{i2dashboard}(dashboard) <- value
\S4method{theme}{i2dashboard}(dashboard)
\S4method{theme}{i2dashboard}(dashboard) <- value
\S4method{datadir}{i2dashboard}(dashboard)
\S4method{datadir}{i2dashboard}(dashboard) <- value
}
\arguments{
\item{dashboard}{A \linkS4class{i2dash::i2dashboard}.}
......@@ -15,4 +31,12 @@
}
\description{
Get/set the interactivity of the i2dashboard.
Get/set the title of the i2dashboard.
Get/set the author of the i2dashboard.
Get/set the theme of the i2dashboard.
Get/set the datadir of the i2dashboard.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment