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.236

Latest news

  • ProcessWire Weekly #550
    In the 550th issue of ProcessWire Weekly we're going to check out the latest core updates, introduce a new third party module called PagefileMetadata, and more. Read on!
    Weekly.pw / 23 November 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani