z_datamodel (zotonic_core v1.0.0-rc.12)

Installing parts of the zotonic datamodel. Installs predicates, categories and default resources.

Link to this section Summary

Functions

Install / update a set of named, predefined resources, categories, predicates, media and edges.
Install / update a set of named, predefined resources, categories, predicates, media and edges.
Reset the state of an imported datamodel, causing all deleted resources to be reimported

Link to this section Types

Link to this type

datamodel_option/0

-type datamodel_option() :: force_update.
Link to this type

datamodel_options/0

-type datamodel_options() :: [datamodel_option()].

Link to this section Functions

Link to this function

manage(Module, Datamodel, Context)

-spec manage(Module, Datamodel, Context) -> ok
          when Module :: atom(), Datamodel :: #datamodel{}, Context :: z:context().
Install / update a set of named, predefined resources, categories, predicates, media and edges.
Link to this function

manage(Module, Datamodel, Options, Context)

-spec manage(Module, Datamodel, Options, Context) -> ok
          when
              Module :: atom(),
              Datamodel :: #datamodel{},
              Options :: datamodel_options(),
              Context :: z:context().
Install / update a set of named, predefined resources, categories, predicates, media and edges.
Link to this function

reset_deleted(Module, Context)

-spec reset_deleted(Module, Context) -> ok when Module :: atom(), Context :: z:context().
Reset the state of an imported datamodel, causing all deleted resources to be reimported