I'm sorry, but I speak a little English.
OC version: 3.0.2.0
I know add (when install) and delete (when uninstall) events with my extension, but my menus function is not working. Why?
~/admin/controller/extension/payment/hardpay.php
Code: Select all
<?php
class ControllerExtensionPaymentHardPay extends Controller {
private $error = array ();
public function install () {
$this -> load -> model ( 'setting/event' );
$this -> model_setting_event -> addEvent ( 'hardpay', 'admin/view/common/column_left/before', 'extension/payment/HardPay/menus' );
}
public function uninstall () {
$this -> load -> model ( 'setting/event' );
$this -> model_setting_event -> deleteEventByCode ( 'hardpay' );
}
public function menus ( $eventRoute, &$data ) {
$data [ 'menus' ] [] = array (
'id' => 'menu-hardpay',
'icon' => 'fa fa-shopping-cart fa-fw',
'name' => 'HardPay',
'href' => $this -> url -> link ( 'extension/payment/HardPay', 'token=' . $this -> session -> data [ 'token' ], TRUE ),
'children' => array ()
);
}
}