public function removeEmptyGroups()
    {
        $tabs = $this->getFormTabs();

        if (!is_array($tabs)) {
            return;
        }

        $groups = $this->getFormGroups();

        foreach ($tabs as $tabKey => $tab) {
            foreach ($tab['groups'] as $tabGroup) {
                if (!array_key_exists($tabGroup, $groups)) {
                    unset($tabs[$tabKey]);
                }
            }
        }

        $this->setFormTabs($tabs);
    }
public function removeEmptyGroups()
    {
        $tabs = $this->getFormTabs();

        if (!is_array($tabs)) {
            return;
        }

        $groups = $this->getFormGroups();

        foreach ($tabs as $tabKey => $tab) {
            foreach ($tab['groups'] as $tabGroup) {
                if (!array_key_exists($tabGroup, $groups)) {
                    unset($tabs[$tabKey]);
                }
            }
        }

        $this->setFormTabs($tabs);
    }
public function removeEmptyGroups ( ) { $ tabs = $ this -> getFormTabs ( ) ; if ( ! is_array ( $ tabs ) ) { return ; } $ groups = $ this -> getFormGroups ( ) ; foreach ( $ tabs as $ tabKey => $ tab ) { foreach ( $ tab [ 'groups' ] as $ tabGroup ) { if ( ! array_key_exists ( $ tabGroup , $ groups ) ) { unset ( $ tabs [ $ tabKey ] ) ; } } } $ this -> setFormTabs ( $ tabs ) ; }
Removes the empty tabs from the groups
Removes the empty tabs from the groups