This Hook helps to register new ACL Options. These ACL options creates in admin creation area.
App::Module('ACL')->register(ACL Options);
We have to called this function in init() of a component.
Name |
Type |
Description |
---|---|---|
ACL Options |
Mandatory |
Array with ACL options |
Read option list in Register ACL here. See below example:
class Component_Appstore_Register extends appRain_Base_Component
{
public function init()
{
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'
)
)
);
}
}