本文整理汇总了PHP中UserGroup::getID方法的典型用法代码示例。如果您正苦于以下问题:PHP UserGroup::getID方法的具体用法?PHP UserGroup::getID怎么用?PHP UserGroup::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserGroup
的用法示例。
在下文中一共展示了UserGroup::getID方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRecordSetByGroup
/**
* Load users that belong to the specified group
*
* @param DeliveryZone $deliveryZone
* @param bool $loadReferencedRecords
*
* @return ARSet
*/
public static function getRecordSetByGroup(UserGroup $userGroup = null, ARSelectFilter $filter = null, $loadReferencedRecords = array('UserGroup'))
{
if (!$filter) {
$filter = new ARSelectFilter();
}
if (!$userGroup) {
$filter->mergeCondition(new IsNullCond(new ARFieldHandle(__CLASS__, "userGroupID")));
} else {
$filter->mergeCondition(new EqualsCond(new ARFieldHandle(__CLASS__, "userGroupID"), $userGroup->getID()));
}
return self::getRecordSet($filter, $loadReferencedRecords);
}
示例2: getRecordSetArrayByUserGroup
/**
* Load groups to roles associations as array from database using specified group
*
* @param UserGroup $userGroup User group
* @param ARSelectFilter $filter
* @param bool $loadReferencedRecords
*
* @return Array
*/
public static function getRecordSetArrayByUserGroup(UserGroup $userGroup, ARSelectFilter $filter, $loadReferencedRecords = false)
{
$filter->mergeCondition(new EqualsCond(new ARFieldHandle(__CLASS__, "userGroupID"), $userGroup->getID()));
return self::getRecordSetArray(__CLASS__, $filter, $loadReferencedRecords);
}
示例3: createUserGroupFormValidator
/**
* @return RequestValidator
*/
private function createUserGroupFormValidator(UserGroup $group)
{
$validator = $this->getValidator("userGroupForm_" . $group->isExistingRecord() ? $group->getID() : '', $this->request);
$validator->addCheck("name", new IsNotEmptyCheck($this->translate("_error_name_should_not_be_empty")));
$group->getSpecification()->setValidation($validator);
return $validator;
}
示例4: createRolesFormValidator
private function createRolesFormValidator(UserGroup $userGroup)
{
return $this->getValidator('roles_' . $userGroup->getID(), $this->request);
}