ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GroupDTO.php
Go to the documentation of this file.
1<?php
2
20
21class GroupDTO implements Group
22{
23 public function __construct(
24 private string $id,
25 private string $title,
26 private bool $active,
27 private int $position,
28 private int $items,
29 private bool $core = false
30 ) {
31 }
32
33 public function getId(): string
34 {
35 return $this->id;
36 }
37
38 public function withId(string $id): self
39 {
40 $clone = clone $this;
41 $clone->id = $id;
42 return $clone;
43 }
44
45 public function getTitle(): string
46 {
47 return $this->title;
48 }
49
50 public function withTitle(string $title): self
51 {
52 $clone = clone $this;
53 $clone->title = $title;
54 return $clone;
55 }
56
57 public function withActive(bool $active): self
58 {
59 $clone = clone $this;
60 $clone->active = $active;
61 return $clone;
62 }
63
64 public function isActive(): bool
65 {
66 return $this->active;
67 }
68
69 public function withPosition(int $position): self
70 {
71 $clone = clone $this;
72 $clone->position = $position;
73 return $clone;
74 }
75
76 public function getPosition(): int
77 {
78 return $this->position;
79 }
80
81 public function isCore(): bool
82 {
83 return $this->core;
84 }
85
86 public function getItems(): int
87 {
88 return $this->items;
89 }
90
91}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
__construct(private string $id, private string $title, private bool $active, private int $position, private int $items, private bool $core=false)
Definition: GroupDTO.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Group.php:19