Register new customer ACL options. This method helps to create new ACL option in admin manage interface.
We can create input box like Select, Radio, Checkbox. To register an ACL we have to define bellow parameters:
1.Group Name
2.Field Name
3.Value list
Following method used to register
App::Module('ACL')->Register(
Array( 'Group_Name'=>'Group Title',
Array(
'Field_Name'=>'Field Title'
'Field_Name'=>'Field Title'
)
)
We must write this code in the place that execute before rendering the admin update interface. Generally we us this code in Components development.
Write See bellow example:
App::Module('ACL')->register(
array('appstore'=>'Store'),
array(
'orderaccess'=>array(
'title'=>'Order Process',
'inputtype'=>'checkboxTag',
'options' => array(
'view'=>'View',
'edit'=>'Edit',
'delete'=>'Delete'
),
'defaultvalue'=>'view,edit'
),
'paymentmethod'=>array(
'title'=>'Payment Methods Access',
'inputtype'=>'radioTag',
'options' => array(
'enable'=>'Enable',
'disabled'=>'Disabled'
),
'defaultvalue'=>'disabled'
)
)
);