Export/Exporter.php
private function generateSubtreeCriteria($mandatorId = null, $siteAccess = null)
    {
        $siteAccesses = $this->siteAccessHelper->getSiteAccesses($mandatorId, $siteAccess);

        $subtreeCriteria = [];
        $rootLocations = $this->siteAccessHelper->getRootLocationsBySiteAccesses($siteAccesses);
        foreach ($rootLocations as $rootLocationId) {
            $subtreeCriteria[] = new Criterion\Subtree($this->locationService->loadLocation($rootLocationId)->pathString);
        }

        return new Criterion\LogicalOr($subtreeCriteria);
    }
private function generateSubtreeCriteria($mandatorId = null, $siteAccess = null)
    {
        $siteAccesses = $this->siteAccessHelper->getSiteAccesses($mandatorId, $siteAccess);

        $subtreeCriteria = [];
        $rootLocations = $this->siteAccessHelper->getRootLocationsBySiteAccesses($siteAccesses);
        foreach ($rootLocations as $rootLocationId) {
            $subtreeCriteria[] = new Criterion\Subtree($this->locationService->loadLocation($rootLocationId)->pathString);
        }

        return new Criterion\LogicalOr($subtreeCriteria);
    }
private function generateSubtreeCriteria ( $ mandatorId = null , $ siteAccess = null ) { $ siteAccesses = $ this -> siteAccessHelper -> getSiteAccesses ( $ mandatorId , $ siteAccess ) ; $ subtreeCriteria = [ ] ; $ rootLocations = $ this -> siteAccessHelper -> getRootLocationsBySiteAccesses ( $ siteAccesses ) ; foreach ( $ rootLocations as $ rootLocationId ) { $ subtreeCriteria [ ] = new Criterion \ Subtree ( $ this -> locationService -> loadLocation ( $ rootLocationId ) -> pathString ) ; } return new Criterion \ LogicalOr ( $ subtreeCriteria ) ; }
Generates Criterions based on mandatorId or requested siteAccess.

@param null|int $mandatorId
@param null|string $siteAccess

@return Criterion\LogicalOr
Generates Criterions based on mandatorId or requested siteAccess .