本文整理汇总了PHP中SugarBean::bean_implements方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarBean::bean_implements方法的具体用法?PHP SugarBean::bean_implements怎么用?PHP SugarBean::bean_implements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarBean
的用法示例。
在下文中一共展示了SugarBean::bean_implements方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AND
function build_report_access_query(SugarBean $module, $alias)
{
$module->table_name = $alias;
$where = '';
if ($module->bean_implements('ACL') && ACLController::requireOwner($module->module_dir, 'list')) {
global $current_user;
$owner_where = $module->getOwnerWhere($current_user->id);
$where = ' AND ' . $owner_where;
}
if (file_exists('modules/SecurityGroups/SecurityGroup.php')) {
/* BEGIN - SECURITY GROUPS */
if ($module->bean_implements('ACL') && ACLController::requireSecurityGroup($module->module_dir, 'list')) {
require_once 'modules/SecurityGroups/SecurityGroup.php';
global $current_user;
$owner_where = $module->getOwnerWhere($current_user->id);
$group_where = SecurityGroup::getGroupWhere($alias, $module->module_dir, $current_user->id);
if (!empty($owner_where)) {
$where .= " AND (" . $owner_where . " or " . $group_where . ") ";
} else {
$where .= ' AND ' . $group_where;
}
}
/* END - SECURITY GROUPS */
}
return $where;
}
示例2: bean_implements
public function bean_implements($interface)
{
switch ($interface) {
case 'FILE':
return true;
}
return parent::bean_implements($interface);
}
示例3: bean_implements
public function bean_implements($interface)
{
if ($interface == 'FILE') {
return true;
}
return parent::bean_implements($interface);
}