예제 #1
0
 /**
  * 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;
     }
 }
예제 #2
0
 /**
  * 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());
     }
 }