public function removeTab($tabNames, $mapper)
    {
        $currentTabs = $this->getFormTabs();
        foreach ($currentTabs as $k => $item) {
            if (is_array($tabNames) && in_array($item['name'], $tabNames) || !is_array($tabNames) && $item['name'] === $tabNames) {
                foreach ($item['groups'] as $groupName) {
                    $this->removeAllFieldsFromFormGroup($groupName, $mapper);
                }
                unset($currentTabs[$k]);
            }
        }
        $this->setFormTabs($currentTabs);
    }