lib/Form/SectionType.php
private function getSections(Options $options): array
    {
        $allSections = [];

        /** @var \eZ\Publish\API\Repository\Values\Content\Section[] $sections */
        $sections = $this->sectionService->loadSections();
        $configuredSections = $options['sections'];

        foreach ($sections as $section) {
            if (count($configuredSections) > 0 && !in_array($section->identifier, $configuredSections, true)) {
                continue;
            }

            $allSections[$section->name] = $section->identifier;
        }

        return $allSections;
    }
private function getSections(Options $options): array
    {
        $allSections = [];

        /** @var \eZ\Publish\API\Repository\Values\Content\Section[] $sections */
        $sections = $this->sectionService->loadSections();
        $configuredSections = $options['sections'];

        foreach ($sections as $section) {
            if (count($configuredSections) > 0 && !in_array($section->identifier, $configuredSections, true)) {
                continue;
            }

            $allSections[$section->name] = $section->identifier;
        }

        return $allSections;
    }
private function getSections ( Options $ options ) : array { $ allSections = [ ] ; /** @var \eZ\Publish\API\Repository\Values\Content\Section[] $sections */ $ sections = $ this -> sectionService -> loadSections ( ) ; $ configuredSections = $ options [ 'sections' ] ; foreach ( $ sections as $ section ) { if ( count ( $ configuredSections ) > 0 && ! in_array ( $ section -> identifier , $ configuredSections , true ) ) { continue ; } $ allSections [ $ section -> name ] = $ section -> identifier ; } return $ allSections ; }
Returns the allowed sections from eZ Platform.
Returns the allowed sections from eZ Platform .