ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Section.php
Go to the documentation of this file.
1<?php
2
20declare(strict_types=1);
21
22declare(strict_types=1);
23
25
26use ILIAS\Data\Factory as DataFactory;
29
33class Section extends Group implements C\Input\Field\Section
34{
35 protected int $nesting_level = 0;
36
37 public function __construct(
38 DataFactory $data_factory,
41 array $inputs,
42 string $label,
43 ?string $byline = null
44 ) {
45 parent::__construct($data_factory, $refinery, $lng, $inputs, $label, $byline);
47 }
48
49 public function setNestingLevel(int $nesting_level): void
50 {
51 $this->nesting_level = $nesting_level;
53 }
54
55 public function getNestingLevel(): int
56 {
58 }
59
60 protected function setInputs(array $inputs): void
61 {
64 }
65
66 private function updateChildrenNestingLevels(): void
67 {
68 foreach ($this->getInputs() as $input) {
69 if ($input instanceof Section) {
70 $nesting_level = $this->getNestingLevel() + 1;
71 $input->setNestingLevel($nesting_level);
72 }
73 }
74 }
75}
Factory for Date Formats.
Definition: Factory.php:27
Builds data types.
Definition: Factory.php:36
This implements the group input.
Definition: Group.php:41
This implements the section input.
Definition: Section.php:34
__construct(DataFactory $data_factory, \ILIAS\Refinery\Factory $refinery, Language $lng, array $inputs, string $label, ?string $byline=null)
Definition: Section.php:37
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Checkbox.php:21
setInputs(array $inputs)
This setter should be used instead of accessing $this->inputs directly.
Definition: Group.php:163
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $lng
Definition: privfeed.php:31