class UserSelector (View source)

Properties

protected Application $app The application container instance.

Methods

__construct(Application $app)

Initialize the instance.

string
selectUser(string $fieldName, int|false $uID = false)

Build the HTML to be placed in a page to choose a user using a popup dialog.

string
quickSelect(string $fieldName, int|false $uID = false, array $miscFields = [])

Build the HTML to be placed in a page to choose a user using a select with users pupulated dynamically with ajax requests.

string
selectMultipleUsers(string $fieldName, User[]|UserInfo[]|Traversable $users = [])

Build the HTML to be placed in a page to choose multiple users using a popup dialog.

Details

__construct(Application $app)

Initialize the instance.

Parameters

Application $app

string selectUser(string $fieldName, int|false $uID = false)

Build the HTML to be placed in a page to choose a user using a popup dialog.

Parameters

string $fieldName the name of the field
int|false $uID the ID of the user to be initially selected

Return Value

string

string quickSelect(string $fieldName, int|false $uID = false, array $miscFields = [])

Build the HTML to be placed in a page to choose a user using a select with users pupulated dynamically with ajax requests.

Parameters

string $fieldName the name of the field
int|false $uID the ID of the user to be initially selected
array $miscFields additional fields appended to the hidden input element (a hash array of attributes name => value), possibly including 'class'

Return Value

string

string selectMultipleUsers(string $fieldName, User[]|UserInfo[]|Traversable $users = [])

Build the HTML to be placed in a page to choose multiple users using a popup dialog.

Parameters

string $fieldName the name of the field
User[]|UserInfo[]|Traversable $users The users to be initially selected

Return Value

string