function SettingTrait::get_field in Fasttoggle 8.2
Retrieve the FieldItem for a setting.
1 call to SettingTrait::get_field()
- SettingTrait::get_value in src/
Plugin/ Setting/ SettingTrait.php - Retrieve the current value of the setting.
File
- src/
Plugin/ Setting/ SettingTrait.php, line 120 - Fasttoggle Object List of Values Setting
Class
- SettingTrait
- Abstract interface for settings.
Namespace
Drupal\fasttoggle\Plugin\SettingCode
function get_field() {
if (is_array($this->object)) {
$result = $this->object[$this->name];
}
else {
$result = $this->object->{$this->name};
}
return $result;
}