PrestaShop 1.6
public function installTab($className, $tabName, $tabParentName = false)
{
$tab = new Tab();
$tab->active = 1;
$tab->class_name = $className;
$tab->name = array();
foreach (Language::getLanguages(true) as $lang) {
$tab->name[$lang['id_lang']] = $tabName;
}
if ($tabParentName) {
$tab->id_parent = (int) Tab::getIdFromClassName($tabParentName);
} else {
$tab->id_parent = 0;
}
$tab->module = $this->name;
return $tab->add();
}
PrestaShop 1.7
$this->installTab('AdminParentTab', 'My Module');
$this->installTab('AdminModuleTab', 'Module Tab', 'AdminParentTab');
$this->installTab('AdminSubChildTab', 'Manage Tab', 'AdminModuleTab');
$this->installTab('AdminTabOne', 'Tab One', 'AdminSubChildTab');
$this->installTab('AdminTabTwo', 'Tab Two', 'AdminSubChildTab');
$this->installTab('AdminTabThree', 'Tab Three', 'AdminSubChildTab');