InputfieldSelect::addOptions()
Add multiple options at once
Usage
// basic usage
$inputfieldSelect->addOptions(array $options);
// usage with all arguments
$inputfieldSelect->addOptions(array $options, bool $assoc = true);
Arguments
Name | Type(s) | Description |
---|---|---|
$options | array | Array of options to add. It is assumed that array keys are the option value, and array values are the option labels, unless overridden by the $assoc argument. |
$assoc (optional) | bool | Is $options an associative array? Default:true Specify false if $options is intended to be a regular PHP array, where the array keys/indexes should be ignored, and option value will also be the label. |
Return value
$this
Object instance it was called from (method supports fluent interface).
InputfieldSelect methods and properties
API reference based on ProcessWire core version 3.0.251