LabelStatementsBuilder interface
Collects a list of rules for generating LabelStatements. Also used for collecting dynamically generated permission rules for a User.
Construction
Created by the Platform and passed to the hUserPermissionRules hook.
Use O.labelStatementsBuilder() to create your own when you need to create a LabelStatements object.
Interface
function rule(label, statement, permissions)
Add a rule.
label is the Ref of any store object.
statement is a O.STATEMENT_* constant.
permissions is one or more O.PERM_* constants ORed together.
function add(label, statement, permissions)
Alias for rule() so the code in hUserPermissionRules hooks reads a bit more nicely.
function toLabelStatements()
Creates a LabelStatements object by applying the rules specified by the calls to rule().