ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
CloneRevision.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
31 class CloneRevision extends BaseRevision implements Revision
32 {
33  protected bool $available = true;
34  protected \ILIAS\ResourceStorage\Identification\ResourceIdentification $identification;
35  protected int $version_number = 0;
37  protected int $owner_id = 0;
38  protected string $title = '';
40 
44  public function __construct(ResourceIdentification $identification, FileRevision $revision_to_clone)
45  {
46  $this->revision_to_clone = $revision_to_clone;
47  parent::__construct($identification);
48  }
49 
50 
51  public function setVersionNumber(int $version_number): void
52  {
53  $this->version_number = $version_number;
54  }
55 
56  public function getVersionNumber(): int
57  {
58  return $this->version_number;
59  }
60 
64  public function getInformation(): Information
65  {
66  return $this->information ?? new FileInformation();
67  }
68 
69  public function setInformation(Information $information): void
70  {
71  $this->information = $information;
72  }
73 
77  public function setUnavailable(): void
78  {
79  $this->available = false;
80  }
81 
85  public function isAvailable(): bool
86  {
87  return $this->available;
88  }
89 
90  public function getOwnerId(): int
91  {
92  return $this->owner_id;
93  }
94 
95  public function setOwnerId(int $owner_id): self
96  {
97  $this->owner_id = $owner_id;
98  return $this;
99  }
100 
104  public function setTitle(string $title): Revision
105  {
106  $this->title = $title;
107  return $this;
108  }
109 
110  public function getTitle(): string
111  {
112  return $this->title;
113  }
114 
115  public function getRevisionToClone(): FileRevision
116  {
118  }
119 }
__construct(ResourceIdentification $identification, FileRevision $revision_to_clone)
Revision constructor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS ResourceStorage Identification ResourceIdentification $identification
ILIAS ResourceStorage Information Information $information
__construct(Container $dic, ilPlugin $plugin)