public function __unset($name) { if (!$this->eavEnable) { parent::__unset($name); } else { if ($this->hasEavAttribute($name)) { $this->setEavAttribute($name, null); } else { parent::__unset($name); if ($name === 'eav_set_id') { $this->refreshEavAttributes(); } } } }