public function loadTrashItems(Request $request)
    {
        $offset = $request->query->has('offset') ? (int)$request->query->get('offset') : 0;
        $limit = $request->query->has('limit') ? (int)$request->query->get('limit') : -1;

        $query = new Query();
        $query->offset = $offset >= 0 ? $offset : null;
        $query->limit = $limit >= 0 ? $limit : null;

        $trashItems = array();

        foreach ($this->trashService->findTrashItems($query)->items as $trashItem) {
            $trashItems[] = new Values\RestTrashItem(
                $trashItem,
                $this->locationService->getLocationChildCount($trashItem)
            );
        }

        return new Values\Trash(
            $trashItems,
            $request->getPathInfo()
        );
    }
public function loadTrashItems(Request $request)
    {
        $offset = $request->query->has('offset') ? (int)$request->query->get('offset') : 0;
        $limit = $request->query->has('limit') ? (int)$request->query->get('limit') : -1;

        $query = new Query();
        $query->offset = $offset >= 0 ? $offset : null;
        $query->limit = $limit >= 0 ? $limit : null;

        $trashItems = array();

        foreach ($this->trashService->findTrashItems($query)->items as $trashItem) {
            $trashItems[] = new Values\RestTrashItem(
                $trashItem,
                $this->locationService->getLocationChildCount($trashItem)
            );
        }

        return new Values\Trash(
            $trashItems,
            $request->getPathInfo()
        );
    }
public function loadTrashItems ( Request $ request ) { $ offset = $ request -> query -> has ( 'offset' ) ? ( int ) $ request -> query -> get ( 'offset' ) : 0 ; $ limit = $ request -> query -> has ( 'limit' ) ? ( int ) $ request -> query -> get ( 'limit' ) : - 1 ; $ query = new Query ( ) ; $ query -> offset = $ offset >= 0 ? $ offset : null ; $ query -> limit = $ limit >= 0 ? $ limit : null ; $ trashItems = array ( ) ; foreach ( $ this -> trashService -> findTrashItems ( $ query ) -> items as $ trashItem ) { $ trashItems [ ] = new Values \ RestTrashItem ( $ trashItem , $ this -> locationService -> getLocationChildCount ( $ trashItem ) ) ; } return new Values \ Trash ( $ trashItems , $ request -> getPathInfo ( ) ) ; }
Returns a list of all trash items.

@return \eZ\Publish\Core\REST\Server\Values\Trash
Returns a list of all trash items .