Helper for choosing a node.

package XenForo_Options

 Methods

Fetches a list of node options.

getNodeOptions(integer $selectedForum, mixed $includeRoot, mixed $filter) : array
Static

Parameters

$selectedForum

integer

$includeRoot

mixed

Include root forum (specify a phrase to represent the root forum)

$filter

mixed

Filter the options to allow only the specified type to be selectable

Returns

array

Renders the node 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 node 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 node 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