Class CMS_profile_usersGroupsCatalog

Description

Class CMS_profile_usersGroupsCatalog

Manages the collection of users groups profiles.

Located in /automne/classes/user/profileusersgroupscatalog.php (line 29)

CMS_grandFather
   |
   --CMS_profile_usersGroupsCatalog
Method Summary
 static array(CMS_profile_usersGroup) getAll ()
 static CMS_profile_usersGroup getByID (integer $id, [boolean $reset = false])
 static array(id getGroupsLabels ()
 static array(groupID getGroupsOfUser (CMS_profile_user|integer $user, [boolean $returnIds = false], [ $reset = false])
 static void getGroupUsers (integer $groupID, [boolean $returnObjects = true])
 static array(string) getLettersForTitle ()
 static void labelExists (string $label, [integer $groupId = 0])
 static array(CMS_profile_usersGroup) search ([string $search = ''], [string $letter = ''], [integer $userId = false], [string $groupsIds = array()], [integer $order = ''], [integer $direction = 'asc'], [boolean $start = 0], [ $limit = 0], [ $returnObjects = true], [ &$score = array()])
 static boolean userBelongsToGroup ( $userID,  $groupID)
Methods
static getAll (line 63)

Returns all the profile usersGroups, sorted by label.

Static function.

  • access: public
static array(CMS_profile_usersGroup) getAll ()
static getByID (line 41)

Returns a CMS_profile_usersGroups when given an ID Static function.

  • return: or false on failure
  • access: public
static CMS_profile_usersGroup getByID (integer $id, [boolean $reset = false])
  • integer $id: The DB ID of CMS_profile_usersGroups
  • boolean $reset: Reset groups before loading them
static getGroupOfUser (line 273)

Deprecated, Returns the first userGroup, to which a user belongs to Returns empty group if no group found Static function.

  • access: public
static CMS_profile_usersGroup getGroupOfUser (CMS_profile_user|integer $user)
static getGroupsLabels (line 418)

Get all groups labels

  • return: => label) groups label
  • access: public
static array(id getGroupsLabels ()
static getGroupsOfUser (line 218)

Returns all the userGroup, to which a user belongs to Returns empty group if no group found Static function.

  • return: => CMS_profile_usersGroup)
  • access: public
static array(groupID getGroupsOfUser (CMS_profile_user|integer $user, [boolean $returnIds = false], [ $reset = false])
  • CMS_profile_user|integer $user
  • boolean $returnIds: : return array of groups ids instead of CMS_profile_usersGroup (faster, default : false)
  • $reset
static getGroupUsers (line 325)

Gets the users for a group Static function.

  • access: public
static void getGroupUsers (integer $groupID, [boolean $returnObjects = true])
  • integer $groupID
  • boolean $returnObjects: returnObjects : return CMS_profile_user objects (default) or array of userId
static getLettersForTitle (line 364)

Get all the letters that have a least one group with a title beginning with Static function.

  • access: public
static array(string) getLettersForTitle ()
static labelExists (line 291)

Returns boolean depending on wheather label exists or not Static function.

  • access: public
static void labelExists (string $label, [integer $groupId = 0])
  • string $label
  • integer $groupId
static search (line 98)

Search groups Static function.

  • access: public
static array(CMS_profile_usersGroup) search ([string $search = ''], [string $letter = ''], [integer $userId = false], [string $groupsIds = array()], [integer $order = ''], [integer $direction = 'asc'], [boolean $start = 0], [ $limit = 0], [ $returnObjects = true], [ &$score = array()])
  • string $search: search : search group by lastname, firstname or login
  • string $letter: letter : search group by first lastname letter
  • integer $userId: userId : search group which user belongs to
  • string $groupsIds: order : order by fieldname (without suffix). default : label
  • integer $order: start : search start offset
  • integer $direction: limit : search limit (default : 0 : unlimited)
  • boolean $start: returnObjects : return CMS_profile_usersGroup objects (default) or array of groupId
  • $limit
  • $returnObjects
  • &$score
static userBelongsToGroup (line 393)

Is user belongs to given group ?

  • access: public
static boolean userBelongsToGroup ( $userID,  $groupID)
  • $userID
  • $groupID

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:38:06 +0100 by phpDocumentor 1.4.3