SelectableOptionManager class

Located in file /wire/modules/Fieldtype/FieldtypeOptions/SelectableOptionManager.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the SelectableOptionManager class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
SelectableOptionManager::addOptions(Field $field, $options)
intAdd the given option titles for $field 
SelectableOptionManager::deleteAllOptionsForField(Field $field)
intDelete all options for given field 
SelectableOptionManager::deleteOptions(Field $field, $options)
intDelete the given options for $field 
SelectableOptionManager::deleteOptionsByID(Field $field, array $ids)
intDelete the given option IDs 
SelectableOptionManager::findOptionsByProperty(Field $field, string $property, string $operator, string $value)
SelectableOptionArrayPerform a partial match on title of options 
SelectableOptionManager::getOptions(Field $field)
SelectableOptionArray SelectableOptionReturn array of current options for $field 
SelectableOptionManager::getOptionsByID(Field $field, array $ids)
SelectableOptionArray SelectableOptionShortcut to get options by ID number 
SelectableOptionManager::getOptionsString(SelectableOptionArray $options)
stringGet the options input string used for 
SelectableOptionManager::getRemovedOptionIDs()
arrayReturn the option IDs found to have been removed from the last setOptions() call. 
SelectableOptionManager::install()
(nothing)Install 
SelectableOptionManager::setOptions(Field $field, $options)
arraySet current options for $field, identify and acting on added, deleted, updated options 
SelectableOptionManager::setOptionsString(Field $field, string $value)
arraySet an options string 
SelectableOptionManager::setOptionsStringLanguages(Field $field, array $values)
(nothing)Set options string, but for each language 
SelectableOptionManager::uninstall()
(nothing)Uninstall 
SelectableOptionManager::updateLanguages()
(nothing)Hook method called when a language is added or deleted 
SelectableOptionManager::updateOptions(Field $field, $options)
intUpdate options for field 
SelectableOptionManager::upgrade(string $fromVersion, string $toVersion)
(nothing)Upgrade fieldtype_options table 
SelectableOptionManager::useLanguages()
boolWhether or not multi-language support is in use 
SelectableOptionManager::wired()
(nothing) 

Additional methods and properties

In addition to the methods and properties above, SelectableOptionManager also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #558
    In the 558th issue of ProcessWire Weekly we'll check out the blog post that introduces ProcessWire 3.0.244, share some recent ProcessWire highlights, and more. Read on!
    Weekly.pw / 18 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer