public function removeEmptyHeadersFromWizard(array &$wizardItems)
    {
        $headersWithElements = [];
        foreach ($wizardItems as $key => $wizardItem) {
            $isElement = strpos($key, '_', 1);
            if ($isElement) {
                $headersWithElements[substr($key, 0, $isElement)] = true;
            }
        }
        foreach ($wizardItems as $key => $wizardItem) {
            if ($wizardItems[$key]['header']) {
                if (!isset($headersWithElements[$key])) {
                    unset($wizardItems[$key]);
                }
            }
        }
    }
public function removeEmptyHeadersFromWizard(array &$wizardItems)
    {
        $headersWithElements = [];
        foreach ($wizardItems as $key => $wizardItem) {
            $isElement = strpos($key, '_', 1);
            if ($isElement) {
                $headersWithElements[substr($key, 0, $isElement)] = true;
            }
        }
        foreach ($wizardItems as $key => $wizardItem) {
            if ($wizardItems[$key]['header']) {
                if (!isset($headersWithElements[$key])) {
                    unset($wizardItems[$key]);
                }
            }
        }
    }
public function removeEmptyHeadersFromWizard ( array & $ wizardItems ) { $ headersWithElements = [ ] ; foreach ( $ wizardItems as $ key => $ wizardItem ) { $ isElement = strpos ( $ key , '_' , 1 ) ; if ( $ isElement ) { $ headersWithElements [ substr ( $ key , 0 , $ isElement ) ] = true ; } } foreach ( $ wizardItems as $ key => $ wizardItem ) { if ( $ wizardItems [ $ key ] [ 'header' ] ) { if ( ! isset ( $ headersWithElements [ $ key ] ) ) { unset ( $ wizardItems [ $ key ] ) ; } } } }
remove unnecessary headers from wizard items

@param array $wizardItems
remove unnecessary headers from wizard items