public function FieldInstance::offsetUnset

Implements ArrayAccess::offsetUnset().

File

drupal/core/modules/field/lib/Drupal/field/FieldInstance.php, line 196
Definition of Drupal\field\FieldInstance.

Class

FieldInstance
Class for field instance objects.

Namespace

Drupal\field

Code

public function offsetUnset($offset) {
  unset($this->definition[$offset]);

  // If the widget or formatter properties changed, the corrsponding plugins
  // need to be re-instanciated.
  if ($offset == 'widget') {
    unset($this->widget);
  }
  if ($offset == 'display') {
    unset($this->formatters);
  }
}