public detach ( ) |
public function detach()
{
if ($this->owner) {
foreach ($this->events() as $event => $handler) {
$this->owner->off($event, is_string($handler) ? [$this, $handler] : $handler);
}
$this->owner = null;
}
}
public function detach() { /** @var UpdateAction $owner */ $owner = $this->owner; $owner->controller->off(Controller::EVENT_AFTER_ACTION, [$this, 'handleConflict']); Event::off(ActiveRecord::className(), ActiveRecord::EVENT_INIT, [$this, 'onActiveRecordInit']); parent::detach(); }