You are here

function SettingTrait::get_value in Fasttoggle 8.2

Retrieve the current value of the setting.

Return value

string The current key matching getHumanReadableValueList / getValueList.

2 calls to SettingTrait::get_value()
SettingTrait::nextValue in src/Plugin/Setting/SettingTrait.php
Move to the next setting value.
SettingTrait::previousValue in src/Plugin/Setting/SettingTrait.php
Move to the previous setting value and save it.
1 method overrides SettingTrait::get_value()
NodeStatus::get_value in src/Plugin/Setting/NodeStatus.php
Retrieve the current value of the setting.

File

src/Plugin/Setting/SettingTrait.php, line 137
Fasttoggle Object List of Values Setting

Class

SettingTrait
Abstract interface for settings.

Namespace

Drupal\fasttoggle\Plugin\Setting

Code

function get_value($instance = '') {
  $field = $this
    ->get_field();
  return $field
    ->get($instance == '' ? 0 : $instance)->value;
}