PHP code example of dartmoon / prestashop-tabmanager
1. Go to this page and download the library: Download dartmoon/prestashop-tabmanager library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dartmoon / prestashop-tabmanager example snippets
//...
protected $menu_tabs = [
//
];
//...
//...
public function install()
{
if (
parent::install()
&& TabManager::install($this->menu_tabs, $this)
// && $this->registerHook(...)
) {
//...
return true;
}
return false;
}
public function uninstall()
{
//...
TabManager::uninstallForModule($this);
return parent::uninstall();
}
//...
protected $menu_tabs = [
[// This is a parent tab
'name' => 'Parent tab',
'class_name' => 'UNIQUE_TAB_NAME',
'route_name' => '',
'parent_class_name' => '',
'icon' => 'settings',
'visible' => true,
],
[ // This a child of the previus tab
'name' => 'Child tab',
'class_name' => 'MySuperClass', // Remember that the controller class name is MySuperClassController, but we need to add it without the suffix "Controller"
'route_name' => '',
'parent_class_name' => 'UNIQUE_TAB_NAME',
'icon' => '',
'visible' => true,
],
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.