public function getRelatedRecordsAction(Request $request, $databox_id, $record_id)
    {
        $record = $this->findDataboxById($databox_id)->get_record($record_id);

        $baskets = array_map(function (Basket $basket) {
            return $this->listBasket($basket);
        }, (array) $record->get_container_baskets($this->app['orm.em'], $this->getAuthenticatedUser()));


        $stories = array_map(function (\record_adapter $story) use ($request) {
            return $this->listStory($request, $story);
        }, array_values($record->get_grouping_parents()->get_elements()));

        return Result::create($request, ["baskets" => $baskets, "stories" => $stories])->createResponse();
    }
public function getRelatedRecordsAction(Request $request, $databox_id, $record_id)
    {
        $record = $this->findDataboxById($databox_id)->get_record($record_id);

        $baskets = array_map(function (Basket $basket) {
            return $this->listBasket($basket);
        }, (array) $record->get_container_baskets($this->app['orm.em'], $this->getAuthenticatedUser()));


        $stories = array_map(function (\record_adapter $story) use ($request) {
            return $this->listStory($request, $story);
        }, array_values($record->get_grouping_parents()->get_elements()));

        return Result::create($request, ["baskets" => $baskets, "stories" => $stories])->createResponse();
    }
public function getRelatedRecordsAction ( Request $ request , $ databox_id , $ record_id ) { $ record = $ this -> findDataboxById ( $ databox_id ) -> get_record ( $ record_id ) ; $ baskets = array_map ( function ( Basket $ basket ) { return $ this -> listBasket ( $ basket ) ; } , ( array ) $ record -> get_container_baskets ( $ this -> app [ 'orm.em' ] , $ this -> getAuthenticatedUser ( ) ) ) ; $ stories = array_map ( function ( \ record_adapter $ story ) use ( $ request ) { return $ this -> listStory ( $ request , $ story ) ; } , array_values ( $ record -> get_grouping_parents ( ) -> get_elements ( ) ) ) ; return Result :: create ( $ request , [ "baskets" => $ baskets , "stories" => $ stories ] ) -> createResponse ( ) ; }
Get a Response containing the baskets where the record is in

@param Request $request
@param int     $databox_id
@param int     $record_id

@return Response
Get a Response containing the baskets where the record is in