ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIASTypeDataResolver.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27{
28 public function __construct(
29 private \ilTree $tree
30 ) {
31 }
32
33 public function resolveForRefId(int $ref_id): RepoTypeData
34 {
35 $tree_info = $this->tree->getNodeData($ref_id);
36
37 return new RepoTypeData(
38 $tree_info['type'],
39 (int) $tree_info['ref_id'],
40 );
41 }
42
43}
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
$ref_id
Definition: ltiauth.php:66