Back to UserGroupsHelper class

Method setGroups

public self
setGroups
(array $groups)
Set the groups to be used as source.
Parameters
  • array $groups Array of user groups.
Returns
  • self
Since
  • 3.6.3

Method setGroups - Source code

/**
 * Set the groups to be used as source.
 *
 * @param   array  $groups  Array of user groups.
 *
 * @return  self
 *
 * @since   3.6.3
 */
public function setGroups(array $groups)
{
    $this->groups = $groups;
    $this->populateGroupsData();
    $this->total = \count($groups);
    return $this;
}