Getting images from a file set


can somebody give me some hints how I can get the images from a file set and output them?

I started to make a block but I don't know how to get
- the existing file sets (the user should be able to select the file set)
- the images from that selected file set.

See 'clearing' branch at github:

Any help would be appreciated.


View Replies:
hutman replied on at Permalink Reply
Using this should give you a list of File Sets that the user has access to


If you need all file sets regardless of who the user is you should be able to do this

$u = User::getByUserID(1);
$fileSets = FileSet::getMySets($u);

To get a list of files in that set you just need to do something like this

$fl = new FileList();
$fl->filterBySet(FileSet $fs);
$files = $fl->get($itemsToGet = 100, $offset = 0);

That's all from the Files Documentation, I'm not sure how much of that will have changed for 5.7
mesuva replied on at Permalink Reply
I updated the List Files From Set block for 5.7, it's the master branch here:

Then to output the images, it's just a case of creating a custom block template to output img tags for the files instead of links. It should be pretty much the same as 5.6, you could refer to to show what needs to happen.
core77 replied on at Permalink Reply
Hi guys,

thank you very much!

Yesterday I discovered your package on github, mesuva. Very nice!!
Since I want to learn developing blocks I'll try it myself. Your package/block is a nice study object.