ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
CollectionWrapperGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Exercise\IRSS;
22 
26 
28 {
29  protected \ILIAS\ResourceStorage\Services $irss;
30 
31  public function __construct()
32  {
33  global $DIC;
34  $this->irss = $DIC->resourceStorage();
35  }
36 
37  public function getResourceCollectionGUI(
38  ResourceStakeholder $stakeholder,
39  string $rcid,
40  string $caption,
41  bool $write = false
43  if ($rcid === "") {
44  throw new \LogicException("No resource collection ID given.");
45  }
46  $collection = $this->irss->collection()->get($this->irss->collection()->id($rcid));
47  return new \ilResourceCollectionGUI(
48  new Configuration(
49  $collection,
50  $stakeholder,
51  $caption,
52  Mode::DATA_TABLE,
53  100,
54  $write,
55  $write
56  )
57  );
58  }
59 }
global $DIC
Definition: feed.php:28
getResourceCollectionGUI(ResourceStakeholder $stakeholder, string $rcid, string $caption, bool $write=false)