You are here

public function NodeListField::getValueList in Fasttoggle 8.2

Get a list of actual values for the setting, in the order used.

Keys should match those returned for the list of human readable labels.

Return value

array An array of the actual values for the field, with keys matching those returned by getHumanReadableValueList.

Overrides SettingTrait::getValueList

1 call to NodeListField::getValueList()
NodeListField::getDefault in src/Plugin/Setting/NodeListField.php

File

src/Plugin/Setting/NodeListField.php, line 92
Fasttoggle Node Sticky

Class

NodeListField
Abstract interface for settings. Plugin strings are used for quick filtering without the need to instantiate the class.

Namespace

Drupal\fasttoggle\Plugin\Setting

Code

public function getValueList() {
  $provider = $this->field
    ->getFieldStorageDefinition()
    ->getOptionsProvider('value', $this->object);

  // Flatten the possible options, to support opt groups.
  return OptGroup::flattenOptions($provider
    ->getPossibleOptions());
}