Helper for choosing a usergroup.

package XenForo_Options

 Methods

Fetches a list of user group options.

getUserGroupOptions(integer $selectedGroup, mixed $unspecifiedPhrase) : array
Static

Parameters

$selectedGroup

integer

$unspecifiedPhrase

mixed

Include 'unspecified' option (specify a phrase to represent the unspecified option)

Returns

array

Renders the user group chooser option as a group of <input type="radio" />.

renderRadio(\XenForo_View $view, string $fieldPrefix, array $preparedOption, boolean $canEdit) : \XenForo_Template_Abstract
Static

Parameters

$view

\XenForo_View

View object

$fieldPrefix

string

Prefix for the HTML form field name

$preparedOption

array

Prepared option info

$canEdit

boolean

True if an "edit" link should appear

Returns

Renders the user group chooser option as a <select>.

renderSelect(\XenForo_View $view, string $fieldPrefix, array $preparedOption, boolean $canEdit) : \XenForo_Template_Abstract
Static

Parameters

$view

\XenForo_View

View object

$fieldPrefix

string

Prefix for the HTML form field name

$preparedOption

array

Prepared option info

$canEdit

boolean

True if an "edit" link should appear

Returns

Renders the user group chooser option.

_render(string $templateName, \XenForo_View $view, string $fieldPrefix, array $preparedOption, boolean $canEdit) : \XenForo_Template_Abstract
Static

Parameters

$templateName

string

Name of template to render

$view

\XenForo_View

View object

$fieldPrefix

string

Prefix for the HTML form field name

$preparedOption

array

Prepared option info

$canEdit

boolean

True if an "edit" link should appear

Returns