Skip to content

Instantly share code, notes, and snippets.

@creocoder
Created July 2, 2013 18:38
Show Gist options
  • Select an option

  • Save creocoder/5911889 to your computer and use it in GitHub Desktop.

Select an option

Save creocoder/5911889 to your computer and use it in GitHub Desktop.
protected function beforeDelete()
{
if (method_exists($this->relation, 'beforeCommentDelete')) {
$this->onBeforeDelete = array($this->relation, 'beforeCommentDelete');
}
return parent::beforeDelete();
}
protected function afterDelete()
{
if (method_exists($this->relation, 'afterCommentDelete')) {
$this->onAfterDelete = array($this->relation, 'afterCommentDelete');
}
parent::afterDelete();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment