Back to RulesField class

Method getUserGroups

protected array
getUserGroups
()
Get a list of the user groups.
Returns
  • array
Since
  • 1.7.0
Class: RulesField
Project: Joomla

Method getUserGroups - Source code

/**
 * Get a list of the user groups.
 *
 * @return  array
 *
 * @since   1.7.0
 */
protected function getUserGroups()
{
    $options = UserGroupsHelper::getInstance()->getAll();
    foreach ($options as &$option) {
        $option->value = $option->id;
        $option->text = $option->title;
    }
    return array_values($options);
}