Implements the magic method for unset().
public function __unset($name) { // Unsetting a field means emptying it. if ($this->hasField($name)) { $this->get($name) ->setValue([]); } else { unset($this->values[$name]); } }