Scrivito.createWidgetClass
generates a widget class using the given definition.
Analogously to an object class, a widget class defines the properties of its instances.
Creates a CMS widget type without adding it to the registry of CMS widget types.
Scrivito.createWidgetClass
generates a widget class using the given definition.
Analogously to an object class, a widget class defines the properties of its instances.
Please note that Scrivito.createWidgetClass
does not automatically add the
generated class to the registry of CMS types. Instead, it is considered an
„abstract class“. An abstract class is useful:
Scrivito.provideWidgetClass
.
Params
definition
(Object) – See the definition of Scrivito.provideWidgetClass
.Example
Create a an abstract class named BaseClass
and an ImageWidget
subclass.