protected function getAvailableSections(BundleInterface $bundle, $context = null, $defaultSections = [])
    {
        $configs = [];
        $counter = 1;

        // Get the available sections from disc
        $dir = Kernel::VERSION_ID >= 40000 ?
            $this->getContainer()->getParameter('kernel.project_dir').'/config/kunstmaancms/pageparts/' :
            $bundle->getPath().'/Resources/config/pageparts/'
        ;
        if (file_exists($dir) && is_dir($dir)) {
            $finder = new Finder();
            $finder->files()->in($dir)->depth('== 0');
            foreach ($finder as $file) {
                $info = $this->getSectionInfo($dir, $file->getFileName());

                if (is_array($info) && (is_null($context) || $info['context'] == $context)) {
                    $configs[$counter++] = $info;
                    if (array_key_exists($info['file'], $defaultSections)) {
                        unset($defaultSections[$info['file']]);
                    }
                }
            }
        }

        // Add the default sections
        foreach ($defaultSections as $file => $info) {
            if (is_null($context) || $info['context'] == $context) {
                $configs[$counter++] = $info;
            }
        }

        return $configs;
    }