protected function onBeforeDelete(&$id, &$table) { if (!empty($table->product_type)) { $this->addBehavior($table->product_type); } else { $this->addBehavior('simple'); } return parent::onBeforeDelete($id, $table); }
protected function onBeforeDelete(&$id, &$table) { if (!empty($table->product_type)) { $this->addBehavior($table->product_type); } else { $this->addBehavior('simple'); } return parent::onBeforeDelete($id, $table); }