ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
IliasDBTalkTemplateRepository.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 use ilTree;
26 
28 {
29  private ilTree $tree;
30 
35  public function __construct(ilTree $tree)
36  {
37  $this->tree = $tree;
38  }
39 
43  public function findAll(): array
44  {
45  $rawTemplates = $this->tree->getChildsByType(ilObjTalkTemplateAdministration::getRootRefId(), ilObjTalkTemplate::TYPE);
46  $templates = array_map(function (array $template) {
47  return new ilObjTalkTemplate($template['ref_id']);
48  }, $rawTemplates);
49  return $templates;
50  }
51 }
__construct(ilTree $tree)
IliasDBTalkTemplateRepository constructor.