本文整理汇总了PHP中CRM_Contact_BAO_GroupContactCache::fillIfEmpty方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Contact_BAO_GroupContactCache::fillIfEmpty方法的具体用法?PHP CRM_Contact_BAO_GroupContactCache::fillIfEmpty怎么用?PHP CRM_Contact_BAO_GroupContactCache::fillIfEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Contact_BAO_GroupContactCache
的用法示例。
在下文中一共展示了CRM_Contact_BAO_GroupContactCache::fillIfEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: browse
/**
* Re-implement browse.
*
* We need to do slightly different things for groups vs saved search groups, hence we
* re-implement browse from Page_Basic.
*
* @param int $action
*/
public function browse($action = NULL)
{
$groupPermission = CRM_Core_Permission::check('edit groups') ? CRM_Core_Permission::EDIT : CRM_Core_Permission::VIEW;
$this->assign('groupPermission', $groupPermission);
$showOrgInfo = FALSE;
// CRM-9936
$reservedPermission = CRM_Core_Permission::check('administer reserved groups') ? CRM_Core_Permission::EDIT : CRM_Core_Permission::VIEW;
$this->assign('reservedPermission', $reservedPermission);
if (CRM_Core_Permission::check('administer Multiple Organizations') && CRM_Core_Permission::isMultisiteEnabled()) {
$showOrgInfo = TRUE;
}
$this->assign('showOrgInfo', $showOrgInfo);
// Refresh smart group cache
if (!empty($_GET['update_smart_groups'])) {
CRM_Contact_BAO_GroupContactCache::loadAll();
} else {
CRM_Contact_BAO_GroupContactCache::fillIfEmpty();
}
$this->search();
}
示例2: browse
/**
* We need to do slightly different things for groups vs saved search groups, hence we
* reimplement browse from Page_Basic
*
* @param int $action
*
* @return void
*/
public function browse($action = NULL)
{
$groupPermission = CRM_Core_Permission::check('edit groups') ? CRM_Core_Permission::EDIT : CRM_Core_Permission::VIEW;
$this->assign('groupPermission', $groupPermission);
// $showOrgInfo = FALSE;
// $reservedPermission = CRM_Core_Permission::check('administer reserved groups') ? CRM_Core_Permission::EDIT : CRM_Core_Permission::VIEW;
// $this->assign('reservedPermission', $reservedPermission);
// if (CRM_Core_Permission::check('administer Multiple Organizations') &&
// CRM_Core_Permission::isMultisiteEnabled()
// ) {
// $showOrgInfo = TRUE;
// }
// $this->assign('showOrgInfo', $showOrgInfo);
// Refresh cache
CRM_Contact_BAO_GroupContactCache::fillIfEmpty();
$this->search();
}