This is pretty much the most basic question imaginable, but how can I get the label of an itemset, when all I have is the itemset id? I’m facetting by itemset id (which I have indexed in solr) but I can’t get the label. I was expecting something like itemSet::Load($id); But I can’t see how to programmatically create an ItemSet object from ID.
You get records in Omeka S using the API. The
read operation is used to get a record given its ID. Normally this is done in a controller and just passed to the view, but it can be more convenient to do it directly in a view in some cases.
From a view, the way to do that is to use the API view helper:
$itemSet = $this->api()->read('item_sets', $id);
$itemSet is an ItemSetRepresentation object, on which you can call
displayTitle() to get the set’s title.