SelectableOptionManager::getOptions() method

Return array of current options for $field

Returned array is indexed by "id$option_id" associative, which is used as a way to identify existing options vs. new options

Usage

// basic usage
$items = $selectableOptionManager->getOptions(Field $field);

// usage with all arguments
$items = $selectableOptionManager->getOptions(Field $field, array $filters = []);

Arguments

NameType(s)Description
fieldField
filters (optional)array

Any of array(property => array) where property is 'id', 'title' or 'value'.

Return value

SelectableOptionArray SelectableOption

[]

Exceptions

Method can throw exceptions on error:

  • WireException


SelectableOptionManager methods and properties

API reference based on ProcessWire core version 3.0.248

Latest news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.