class documentation

class ObjChildren(object): (source)

View In Hierarchy

Manage child-object creation and filtered child lookups.

Method filteredObjChildren Return visible child nodes matching the configured child attribute.
Method getObjChildren Return child nodes matching the configured child attribute.
Method getObjChildrenAttr Return the configured child definition for an object key.
Method initObjChild Create and initialize a child object for the current container.
Method initObjChildren Initialize all configured child objects for the current metaobject.
Method manage_initObjChild Handle ZMI creation of a new child object.
Class Variable __ac_permissions__ Undocumented
Class Variable __authorPermissions__ Undocumented
Method _initObjChildren Ensure mandatory and repetitive child objects match metaobject rules.
def filteredObjChildren(self, id, REQUEST, meta_types=None): (source)

Return visible child nodes matching the configured child attribute.

Parameters
id:strChild attribute key.
REQUEST:ZPublisher.HTTPRequestThe active HTTP request.
meta_types:listOptional meta type filter.
Returns
listVisible matching child nodes.
def getObjChildren(self, id, REQUEST, meta_types=None): (source)

Return child nodes matching the configured child attribute.

Parameters
id:strChild attribute key.
REQUEST:ZPublisher.HTTPRequestThe active HTTP request.
meta_types:listOptional meta type filter.
Returns
listMatching child nodes in document order.
def getObjChildrenAttr(self, key, meta_type=None): (source)

Return the configured child definition for an object key.

Parameters
key:strChild attribute key.
meta_type:strOptional metaobject type override.
Returns
dictChild attribute configuration.
def initObjChild(self, id, _sort_id, type, REQUEST): (source)

Create and initialize a child object for the current container.

Parameters
id:strBase object id.
_sort_id:intSort position before normalization.
type:strChild meta type.
REQUEST:ZPublisher.HTTPRequestThe active HTTP request.
Returns
objectThe created or reused child object.
def initObjChildren(self, REQUEST): (source)

Initialize all configured child objects for the current metaobject.

Parameters
REQUEST:ZPublisher.HTTPRequestThe active HTTP request.
def manage_initObjChild(self, id, type, lang, REQUEST, RESPONSE=None): (source)

Handle ZMI creation of a new child object.

Parameters
id:strBase object id.
type:strChild meta type.
lang:strActive UI language.
REQUEST:ZPublisher.HTTPRequestThe active HTTP request.
RESPONSE:ZPublisher.HTTPResponseOptional HTTP response for redirects.
Returns
objectRedirect response when RESPONSE is provided.
__ac_permissions__ = (source)

Undocumented

__authorPermissions__: tuple[str, ...] = (source)

Undocumented

def _initObjChildren(self, obj_attr, REQUEST): (source)

Ensure mandatory and repetitive child objects match metaobject rules.

Parameters
obj_attr:dictMetaobject child attribute definition.
REQUEST:ZPublisher.HTTPRequestThe active HTTP request.