src/Sulu/Component/Webspace/StructureProvider/WebspaceStructureProvider.php
protected function loadStructures($webspaceKey)
    {
        $structures = [];
        $keys = [];
        foreach ($this->structureManager->getStructures() as $page) {
            /* @var PageBridge $page */
            $template = sprintf('%s.html.twig', $page->getView());
            if ($this->templateExists($template)) {
                $keys[] = $page->getKey();
                $structures[] = $page;
            }
        }

        $this->cache->save($webspaceKey, $keys);

        return $structures;
    }
protected function loadStructures($webspaceKey)
    {
        $structures = [];
        $keys = [];
        foreach ($this->structureManager->getStructures() as $page) {
            /* @var PageBridge $page */
            $template = sprintf('%s.html.twig', $page->getView());
            if ($this->templateExists($template)) {
                $keys[] = $page->getKey();
                $structures[] = $page;
            }
        }

        $this->cache->save($webspaceKey, $keys);

        return $structures;
    }
protected function loadStructures ( $ webspaceKey ) { $ structures = [ ] ; $ keys = [ ] ; foreach ( $ this -> structureManager -> getStructures ( ) as $ page ) { /* @var PageBridge $page */ $ template = sprintf ( '%s.html.twig' , $ page -> getView ( ) ) ; if ( $ this -> templateExists ( $ template ) ) { $ keys [ ] = $ page -> getKey ( ) ; $ structures [ ] = $ page ; } } $ this -> cache -> save ( $ webspaceKey , $ keys ) ; return $ structures ; }
Returns and caches structures for given webspace.

@param string $webspaceKey

@return array
Returns and caches structures for given webspace .