src/Sulu/Bundle/PageBundle/Content/PageSelectionContainer.php
private function loadData()
    {
        $result = [];
        if (null !== $this->ids && count($this->ids) > 0) {
            $this->contentQueryBuilder->init(
                [
                    'ids' => $this->ids,
                    'properties' => (isset($this->params['properties']) ? $this->params['properties']->getValue() : []),
                    'published' => !$this->showDrafts,
                ]
            );
            $pages = $this->contentQueryExecutor->execute(
                $this->webspaceKey,
                [$this->languageCode],
                $this->contentQueryBuilder
            );

            // init vars
            $map = [];

            // map pages
            foreach ($pages as $page) {
                $map[$page['uuid']] = $page;
            }

            foreach ($this->ids as $id) {
                if (isset($map[$id])) {
                    $result[] = $map[$id];
                }
            }
        }

        return $result;
    }
private function loadData()
    {
        $result = [];
        if (null !== $this->ids && count($this->ids) > 0) {
            $this->contentQueryBuilder->init(
                [
                    'ids' => $this->ids,
                    'properties' => (isset($this->params['properties']) ? $this->params['properties']->getValue() : []),
                    'published' => !$this->showDrafts,
                ]
            );
            $pages = $this->contentQueryExecutor->execute(
                $this->webspaceKey,
                [$this->languageCode],
                $this->contentQueryBuilder
            );

            // init vars
            $map = [];

            // map pages
            foreach ($pages as $page) {
                $map[$page['uuid']] = $page;
            }

            foreach ($this->ids as $id) {
                if (isset($map[$id])) {
                    $result[] = $map[$id];
                }
            }
        }

        return $result;
    }
private function loadData ( ) { $ result = [ ] ; if ( null !== $ this -> ids && count ( $ this -> ids ) > 0 ) { $ this -> contentQueryBuilder -> init ( [ 'ids' => $ this -> ids , 'properties' => ( isset ( $ this -> params [ 'properties' ] ) ? $ this -> params [ 'properties' ] -> getValue ( ) : [ ] ) , 'published' => ! $ this -> showDrafts , ] ) ; $ pages = $ this -> contentQueryExecutor -> execute ( $ this -> webspaceKey , [ $ this -> languageCode ] , $ this -> contentQueryBuilder ) ; // init vars $ map = [ ] ; // map pages foreach ( $ pages as $ page ) { $ map [ $ page [ 'uuid' ] ] = $ page ; } foreach ( $ this -> ids as $ id ) { if ( isset ( $ map [ $ id ] ) ) { $ result [ ] = $ map [ $ id ] ; } } } return $ result ; }
lazy load data.
lazy load data .