我有3.0 Opencart的有效扩展,我需要将其转换为2.3.0.2。现在,我无法在admin / controller上修复安装/卸载方法
public function install()
{
if (!$this->model_setting_event->getEventByCode('travesty_admin_column_left')) {
$code = "travesty_admin_column_left";
$trigger = "admin/view/common/column_left/before";
$action = "extension/module/travesty/menu";
$this->model_setting_event->addEvent($code, $trigger, $action);
$code = "travesty_footer";
$trigger = "catalog/view/common/footer/before";
$action = "extension/module/travesty/footer";
$this->model_setting_event->addEvent($code, $trigger, $action);
$code = "travesty_header";
$trigger = "catalog/view/common/header/before";
$action = "extension/module/travesty/header";
$this->model_setting_event->addEvent($code, $trigger, $action);
}
}
public function uninstall()
{
$this->model_setting_event->deleteEventByCode('travesty_admin_column_left');
$this->model_setting_event->deleteEventByCode('travesty_footer');
$this->model_setting_event->deleteEventByCode('travesty_header');
}
根据文档,OpenCart 2.2版提供了可用的事件,那么,我应该怎么改变使其起作用?