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

        $devices = $request->get('devices', []);
        $mimes = $request->get('mimes', []);

        $ret = array_values(array_filter(array_map(function ($media) use ($request, $record) {
            return $this->listEmbeddableMedia($request, $record, $media);
        }, $record->get_embedable_medias($devices, $mimes))));

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

        $devices = $request->get('devices', []);
        $mimes = $request->get('mimes', []);

        $ret = array_values(array_filter(array_map(function ($media) use ($request, $record) {
            return $this->listEmbeddableMedia($request, $record, $media);
        }, $record->get_embedable_medias($devices, $mimes))));

        return Result::create($request, ["embed" => $ret])->createResponse();
    }
public function getStoryEmbedAction ( Request $ request , $ databox_id , $ record_id ) { $ record = $ this -> findDataboxById ( $ databox_id ) -> get_record ( $ record_id ) ; $ devices = $ request -> get ( 'devices' , [ ] ) ; $ mimes = $ request -> get ( 'mimes' , [ ] ) ; $ ret = array_values ( array_filter ( array_map ( function ( $ media ) use ( $ request , $ record ) { return $ this -> listEmbeddableMedia ( $ request , $ record , $ media ) ; } , $ record -> get_embedable_medias ( $ devices , $ mimes ) ) ) ) ; return Result :: create ( $ request , [ "embed" => $ ret ] ) -> createResponse ( ) ; }
Get a Response containing the story embed files

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

@return Response
Get a Response containing the story embed files