protected function getCleanAdditionalConfiguration($extensionKey)
    {
        $newLines = [];

        // Load content and search for the include
        if (($content = GeneralUtility::getUrl($this->getConfigurationManager()->getAdditionalConfigurationFileLocation())) !== false)
        {
            $currentLines = explode(LF, $content);

            // Delete the php marker line
            array_shift($currentLines);

            //
            $startFound = false;
            $endFound = false;

            foreach ($currentLines as $line)
            {
                if (($startFound) && (!$endFound)) {
                    $endFound = (strpos($line, '}') !== false);
                } elseif ((!$startFound) && (strpos($line, $extensionKey) !== false)) {
                    $startFound = true;
                    $endFound = false;
                } else {
                    $newLines[] = $line;
                }
            }
        }

        // Remove blank lines at the end
        $revLines = array_reverse($newLines);
        $newLines = [];
        $lineFound = false;

        foreach ($revLines as $line)
        {
            if ($lineFound || !empty(trim($line))) {
                $newLines[] = $line;
                $lineFound = true;
            }
        }

        return array_reverse($newLines);
    }
protected function getCleanAdditionalConfiguration($extensionKey)
    {
        $newLines = [];

        // Load content and search for the include
        if (($content = GeneralUtility::getUrl($this->getConfigurationManager()->getAdditionalConfigurationFileLocation())) !== false)
        {
            $currentLines = explode(LF, $content);

            // Delete the php marker line
            array_shift($currentLines);

            //
            $startFound = false;
            $endFound = false;

            foreach ($currentLines as $line)
            {
                if (($startFound) && (!$endFound)) {
                    $endFound = (strpos($line, '}') !== false);
                } elseif ((!$startFound) && (strpos($line, $extensionKey) !== false)) {
                    $startFound = true;
                    $endFound = false;
                } else {
                    $newLines[] = $line;
                }
            }
        }

        // Remove blank lines at the end
        $revLines = array_reverse($newLines);
        $newLines = [];
        $lineFound = false;

        foreach ($revLines as $line)
        {
            if ($lineFound || !empty(trim($line))) {
                $newLines[] = $line;
                $lineFound = true;
            }
        }

        return array_reverse($newLines);
    }
protected function getCleanAdditionalConfiguration ( $ extensionKey ) { $ newLines = [ ] ; // Load content and search for the include if ( ( $ content = GeneralUtility :: getUrl ( $ this -> getConfigurationManager ( ) -> getAdditionalConfigurationFileLocation ( ) ) ) !== false ) { $ currentLines = explode ( LF , $ content ) ; // Delete the php marker line array_shift ( $ currentLines ) ; // $ startFound = false ; $ endFound = false ; foreach ( $ currentLines as $ line ) { if ( ( $ startFound ) && ( ! $ endFound ) ) { $ endFound = ( strpos ( $ line , '}' ) !== false ) ; } elseif ( ( ! $ startFound ) && ( strpos ( $ line , $ extensionKey ) !== false ) ) { $ startFound = true ; $ endFound = false ; } else { $ newLines [ ] = $ line ; } } } // Remove blank lines at the end $ revLines = array_reverse ( $ newLines ) ; $ newLines = [ ] ; $ lineFound = false ; foreach ( $ revLines as $ line ) { if ( $ lineFound || ! empty ( trim ( $ line ) ) ) { $ newLines [ ] = $ line ; $ lineFound = true ; } } return array_reverse ( $ newLines ) ; }
Returns the lines from AdditionalConfiguration.php file without own additions

@param string $extensionKey Extension key
Returns the lines from AdditionalConfiguration . php file without own additions