public function Instance::save in Little helpers 7.2
Same name and namespace in other branches
- 7 src/Field/Instance.php \Drupal\little_helpers\Field\Instance::save()
Save field instance to database.
See also
File
- src/
Field/ Instance.php, line 128
Class
Namespace
Drupal\little_helpers\FieldCode
public function save() {
if (isset($this->id)) {
\field_update_instance($this
->export());
}
else {
foreach (\field_create_instance($this
->export()) as $k => $v) {
$this->{$k} = $v;
}
}
return $this;
}