ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
IliasDBTalkTemplateRepository.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use 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.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...