Hi I'm developing a module for PS16+,
Is it possible to extend the existing classes instead of overriding them? I would like to extend the \AdminProductsController, it should look exactly like the original but at the same time be completely at the mercy of my custom controller.
Here is what I have:
ExtendedAdminController is launched when the tab to my module is clicked.
class ExtendedAdminController extends \ModuleAdminController
{
public function __construct()
{
parent::__construct();
$this->initController();
$products = new ExtendedProductList();
// DO STUFF WITH THE PRODUCTS, ADD TABS, REMOVE TABS, COLUMNS ETC.
$products->display(); //THIS IS WHERE THE PROBLEM IS
}
}
class ExtendedProductList extends \AdminProductsController
{
public function __construct()
{
parent::__construct();
}
}
$products->display(); gives me errors
Undefined index: iso
Notice: Undefined index: img_dir in... app_icon.png
Alternatively: How do I create my own list of all the available products?
Sincerely grateful for suggestions!