summaryrefslogtreecommitdiffstats
path: root/aconf/model/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'aconf/model/init.lua')
-rw-r--r--aconf/model/init.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/aconf/model/init.lua b/aconf/model/init.lua
index 667da2f..6c78b8f 100644
--- a/aconf/model/init.lua
+++ b/aconf/model/init.lua
@@ -231,6 +231,13 @@ function M.Collection:auto_ui_name(name)
return super(self, M.Collection):auto_ui_name(name)
end
+--- collection field, inherits @{Field}.
+-- @klass Collection
+-- @param type (<i>@{Field}</i> or <i>[&lt;Model&gt;](#new)</i>)
+-- subclass of @{Field}, instance of such, or
+-- [**&lt;Model&gt;**](#new) specifying the type of the members.
+-- @tparam ?string ui_member user-friendly noun for a member of this
+-- collection
function M.Collection:load(context, options)
if not self.iparams.field then
self.iparams.field = to_field(self.type)
@@ -242,17 +249,16 @@ function M.Collection:load(context, options)
end
---- list field, inherits @{Field}. A list is an ordered collection of
---- members. The path of a list member is that of the list augmented
---- by the index of the member.
+--- list field, inherits @{Collection}. The value of this field is an
+-- instance of @{node.List}.
-- @klass List
--- @tparam Field|Model type subclass of @{Field}, instance of such, or
--- subclass of Model specifying the type of the members.
--- @tparam ?string ui_member user-friendly noun for a list member.
M.List = class(M.Collection)
function M.List:init(params) super(self, M.List):init(params, node.List) end
+--- set field, inherits @{Collection}. The value of this field is an
+-- instance of @{node.Set}.
+-- @klass Set
M.Set = class(M.Collection)
function M.Set:init(params)
if not params.widget and isinstance(params.type, M.Reference) then