Joomla - 相当于ACL的JTable绑定覆盖的多个主键

时间:2014-01-20 03:38:56

标签: php joomla

我在JTable绑定方法覆盖中有以下代码:

if(!JFactory::getUser()->authorise('core.admin', 'com_escorders.audittrail.'.$array['id'])){
    $actions = JFactory::getACL()->getActions('com_escorders','audittrail');
    $default_actions = JFactory::getACL()->getAssetRules('com_escorders.audittrail.'.$array['id'])->getData();
    $array_jaccess = array();
    foreach($actions as $action){
        $array_jaccess[$action->name] = $default_actions[$action->name];
    }
    $array['rules'] = $this->JAccessRulestoArray($array_jaccess);
}

当主键为id时,这可以正常工作,但我想为具有多个键的表修改此代码。假设密钥为array['id']key1,我需要取代key2

0 个答案:

没有答案