10 private static ?array $structure =
null;
26 return (
int)$this->
get(
'DEPTH_LEVEL');
31 return $this->
get(
'NAME') ??
'';
36 $this->fillStructure();
38 return isset(self::$structure[
'DATA'][$this->
id]);
48 return [
'id' => $this->id,
'name' => $this->
getName()];
51 private function fillStructure(): void
53 if (isset(self::$structure))
58 if (!Loader::includeModule(
'intranet'))
60 self::$structure = [];
65 $structure = \CIntranetUtils::GetStructure();
67 if (!isset($structure) || !isset($structure[
'DATA']))
69 self::$structure = [];
74 self::$structure = $structure;
77 private function get(
string $fieldName)
79 $this->fillStructure();
81 return self::$structure[
'DATA'][$this->id][$fieldName] ??
null;