module documentation

_zmi_actions_util.py - ZMS ZMI Actions Utility for Action List Generation and Command Handling

Provides zmi_actions, zmi_basic_actions, zmi_insert_actions helper functions for general-purpose ZMS utilities and shared helper functions. It provides common patterns like type checking, data transformation, and error handling.

License: GNU General Public License v2 or later, Organization: ZMS Publishing

Function zmi_actions Return list of actions.
Function zmi_basic_actions Returns sorted list of basic actions (undo, delete, cut, copy, paste, move up/down) and custom commands.
Function zmi_command_actions Returns list of custom commands.
Function zmi_insert_actions Returns sorted list of insert actions.
def zmi_actions(container, context, attr_id='e'): (source)

Return list of actions.

Parameters
container:objectThe container for which to compute actions.
context:objectThe context object for which to compute actions. May be None.
attr_id:strThe attribute ID for which to compute actions. Default is 'e' (edit).
Returns
listList of action tuples (id, label, url, icon_clazz, tooltip).
def zmi_basic_actions(container, context, objAttr, objChildren, objPath=''): (source)

Returns sorted list of basic actions (undo, delete, cut, copy, paste, move up/down) and custom commands.

def zmi_command_actions(context, stereotype='', objPath=''): (source)

Returns list of custom commands.

def zmi_insert_actions(container, context, objAttr, objChildren, objPath=''): (source)

Returns sorted list of insert actions.