Constructor
new ve.ui.ModeledFactory()
#
Mixin for factories whose items associate with specific models.
Classes registered with the factory should have a static method named isCompatibleWith
that
accepts a model and returns a boolean.
TODO: Create an abstract mixin that specifies which properties a "model" should have
- Source:
Mixin for factories whose items associate with specific models.
Methods
getRelatedItems(models) → {Array.<Object>}
#
Get a list of symbolic names for classes related to a list of models.
The lowest compatible item in each inheritance chain will be used.
Additionally if the model has other model names listed in a static.suppresses property, those will be hidden when that model is compatible.
Parameters:
- Source:
Returns:
List of objects containing name
and model
properties, representing
each compatible class's symbolic name and the model it is compatible with
Get a list of symbolic names for classes related to a list of models.