本文整理汇总了PHP中ACLAction::mark_deleted方法的典型用法代码示例。如果您正苦于以下问题:PHP ACLAction::mark_deleted方法的具体用法?PHP ACLAction::mark_deleted怎么用?PHP ACLAction::mark_deleted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACLAction
的用法示例。
在下文中一共展示了ACLAction::mark_deleted方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeActions
/**
* static removeActions($category, $type='module')
* Removes all default actions for a category/type
*
* @param STRING $category - the category (e.g module name - Accounts, Contacts)
* @param STRING $type - the type (e.g. 'module', 'field')
*/
public static function removeActions($category, $type = 'module')
{
global $ACLActions;
$db = DBManagerFactory::getInstance();
if (isset($ACLActions[$type])) {
foreach ($ACLActions[$type]['actions'] as $action_name => $action_def) {
$action = new ACLAction();
$query = "SELECT * FROM " . $action->table_name . " WHERE name='{$action_name}' AND category = '{$category}' AND acltype='{$type}' and deleted=0";
$result = $db->query($query);
//only add if an action with that name and category don't exist
$row = $db->fetchByAssoc($result);
if ($row != null) {
$action->mark_deleted($row['id']);
}
}
} else {
sugar_die("FAILED TO REMOVE: {$category} : {$name} - TYPE {$type} NOT DEFINED IN modules/ACLActions/actiondefs.php");
}
}