Datamanager 2 privilege checkbox widget.

Based on the regular checkbox widget but with advanced checks that hide the form elelments in case the user does not have sufficient privileges.

This type requires a privilege base type.

package midcom.helper.datamanager2

 Methods

_on_initialize ()

The initialization event handler validates the base type

Returns

booleanIndicating Success

add_elements_to_form ($attributes)

Adds the checkbox if and only if either the base object is yet null (new object being created) or the user has privileges permissions on the base object.

Parameters

$attributes

is_frozen ()

Checks if and only if either the base object is yet null (new object being created) or the user has privileges permissions on the base object.

Otherwise, the fucntion will return false always.

sync_type_with_widget ($results)

Synchronizes if and only if either the base object is yet null (new object being created) or the user has privileges permissions on the base object.

Parameters

$results