You are here

function SettingTrait::setField in Fasttoggle 8.2

Set a custom field name (eg fields on nodes).

File

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

Class

SettingTrait
Abstract interface for settings.

Namespace

Drupal\fasttoggle\Plugin\Setting

Code

function setField($field) {
  if ($field) {
    $this->field = $field;
    $this->name = $field
      ->getName();
  }
  else {
    unset($this->field);
    unset($this->name);
  }
}