wingMemberPins
(/rs/public/functions.php)
wingMemberPins -- Array containing pins of members in a wing.
Description
array wingMemberPins
($wingID, $officers = "all", $includeCadets = false)
This function will return an array containing the pins of all members in the specified wing.
$wingID is the id of the wing in the database.
$officers can be "all" or "only". "all" is the default value and returns everyone in the wing, officers and non-officers. If "only" is passed, only wing and squadron officers (CO, XO, and SO) will be returned. "only" will override any value set for $includeCadets.
$includeCadets is a boolean which defaults to false. If it is set to true, cadets are included when returning members.
This function will return an empty array on failure.
Examples
wingMemberPins (1) /* Returns the pins of all members in wing with id 1, not including cadets. */
wingMemberPins (1, "only") /* Returns all the wing and squadron officers in wing with id 1. Cadets are included if the cadet is an officer. */
wingMemberPins (1, "all", true) /* Returns the pins of all members in wing with id 1, including cadets. */
wingMemberPins () /* Returns an empty array */
Related Functions
squadMemberPins, fleetMemberPins
Dependencies
squadMemberPins, absArray
Function Index
|