Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe UserGroupsHelper

Fonctions membres publiques

 __construct (array $groups=array(), $mode=self::MODE_INSTANCE)
 
 count ()
 
 get ($id)
 
 getAll ()
 
 has ($id)
 
 total ()
 
 load ($id)
 
 loadAll ()
 
 populateGroupData ($group)
 
 setGroups (array $groups)
 

Fonctions membres publiques statiques

static getInstance ()
 

Champs de données

const MODE_SINGLETON = 1
 
const MODE_INSTANCE = 2
 

Fonctions membres privées

 isSingleton ()
 
 populateGroupsData ()
 

Attributs privés

 $groups = array()
 
 $mode
 
 $total
 

Attributs privés statiques

static $instance
 

Description détaillée

Helper to deal with user groups.

Depuis
3.6.3

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( array  $groups = array(),
  $mode = self::MODE_INSTANCE 
)

Constructor

Paramètres
array$groupsArray of groups
integer$modeWorking mode for this class
Depuis
3.6.3

Références $groups, et $mode.

Documentation des fonctions membres

◆ count()

count ( )

Count loaded user groups.

Renvoie
integer
Depuis
3.6.3

◆ get()

get (   $id)

Get a user group by its id.

Paramètres
integer$idGroup identifier
Renvoie
mixed stdClass on success. False otherwise
Depuis
3.6.3

Références $id.

◆ getAll()

getAll ( )

Get the list of existing user groups.

Renvoie
array
Depuis
3.6.3

Références $groups.

◆ getInstance()

static getInstance ( )
static

Get the helper instance.

Renvoie
self
Depuis
3.6.3

Références $groups, et null.

Référencé par UsergrouplistField\getOptions().

◆ has()

has (   $id)

Check if a group is in the list.

Paramètres
integer$idGroup identifier
Renvoie
boolean
Depuis
3.6.3

Références $id.

◆ isSingleton()

isSingleton ( )
private

Check if this instance is a singleton.

Renvoie
boolean
Depuis
3.6.3

◆ load()

load (   $id)

Load a group from database.

Paramètres
integer$idGroup identifier
Renvoie
mixed
Depuis
3.6.3

Références $db, $id, et $query.

◆ loadAll()

loadAll ( )

Load all user groups from the database.

Renvoie
self
Depuis
3.6.3

Références $db, $groups, et $query.

◆ populateGroupData()

populateGroupData (   $group)

Populate data for a specific user group.

Paramètres
\stdClass$groupGroup
Renvoie
Depuis
3.6.3

Références if.

◆ populateGroupsData()

populateGroupsData ( )
private

Populates extra information for groups.

Renvoie
array
Depuis
3.6.3

Références $groups.

◆ setGroups()

setGroups ( array  $groups)

Set the groups to be used as source.

Paramètres
array$groupsArray of user groups.
Renvoie
self
Depuis
3.6.3

Références $groups.

◆ total()

total ( )

Get total available user groups in database.

Renvoie
integer
Depuis
3.6.3

Références $db, $query, $total, et null.

Documentation des champs

◆ $groups

$groups = array()
private

◆ $instance

$instance
staticprivate

◆ $mode

$mode
private

◆ $total

$total
private

◆ MODE_INSTANCE

const MODE_INSTANCE = 2

◆ MODE_SINGLETON

const MODE_SINGLETON = 1

La documentation de cette classe a été générée à partir du fichier suivant :