/** * Detaches the entity from a component * @param CComponent $owner the owner component */ public function detach($owner) { parent::detach($owner); if (method_exists($owner, "getPrimaryKey")) { $this->name = $this->_oldName; } }
/** * Detaches the state machine from a component * @param CComponent $owner the component to detach from */ public function detach($owner) { parent::detach($owner); if ($this->_uniqueID !== null) { $owner->detachBehavior($this->_uniqueID . "_" . $this->getStateName()); } }