Hi,
HikaMarket use the "authorization" function. Each task has to be listed in the controller.
protected $rights = array(
'display' => array('cpanel', 'show', 'register', 'form'),
'add' => array(),
'edit' => array('save'),
'modify' => array(),
'delete' => array()
);
Some task categories ask for a token (modify / delete). The display category is the default one.
If a task is not listed in this array, the controller would refused it.
I have implemented for the next release of HikaMarket a way to override every classes (or some helpers). I think I will provide such solution for overriding views and controllers.
The idea is to create a new file in the same directory. If you want to override the vendor controller, you would create a file named "vendor.override.php".
This file would be include instead of the classical controller.
The idea is to extend to controller without rewrite it.
<?php
include dirname(__FILE__).DS.'vendor.php';
class vendorMarketOverrideController extends vendorMarketController {
public function __construct($config = array(), $skip = false) {
$this->rights['display'][] = 'mytask';
parent::__construct($config, $skip);
}
public function mytask() {
JRequest::setVar('layout', 'mytask');
return parent::display();
}
}
Like that, you can add and override all you want without loosing any compatibility.
If a controller changes in HikaMarket, some new task are added, you could still update and use the new features ; without loosing yours.
(And I think I will add a function in order to provide a good way to merge rights)
Regards,