ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
hasTitleTrait.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 trait hasTitleTrait
27 {
28  protected string $title = '';
29 
30  public function getTitle(): string
31  {
32  return $this->title;
33  }
34 
35  public function withTitle(string $title): isItem
36  {
37  $clone = clone $this;
38  $clone->title = $title;
39  return $clone;
40  }
41 }