ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
class.Posting.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ilDateTime;
24
26{
27 public function __construct(
28 protected int $id,
29 protected int $blog_id,
30 protected string $title,
31 protected ilDateTime $created,
32 protected int $author,
33 protected bool $approved,
34 protected ?ilDateTime $last_withdrawn,
35 protected bool $active,
36 ) {
37 }
38
39 public function getId(): int
40 {
41 return $this->id;
42 }
43
44 public function getBlogId(): int
45 {
46 return $this->blog_id;
47 }
48
49 public function getTitle(): string
50 {
51 return $this->title;
52 }
53
54 public function getCreated(): ilDateTime
55 {
56 return $this->created;
57 }
58
59 public function getAuthor(): int
60 {
61 return $this->author;
62 }
63
64 public function isApproved(): bool
65 {
66 return $this->approved;
67 }
68
69 public function getLastWithdrawn(): ?ilDateTime
70 {
71 return $this->last_withdrawn;
72 }
73
74 public function isActive(): bool
75 {
76 return $this->active;
77 }
78
79 public function withActive(bool $active): self
80 {
81 $posting = clone $this;
82 $posting->active = $active;
83 return $posting;
84 }
85
86}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
__construct(protected int $id, protected int $blog_id, protected string $title, protected ilDateTime $created, protected int $author, protected bool $approved, protected ?ilDateTime $last_withdrawn, protected bool $active,)
@classDescription Date and time handling