ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
IliasDBTalkTemplateRepository.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
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 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilTree $tree)
IliasDBTalkTemplateRepository constructor.