1<?php namespace ILIAS\GlobalScreen\Scope\MainMenu\Factory\TopItem; 2 3use ILIAS\GlobalScreen\Scope\MainMenu\Factory\AbstractParentItem; 4use ILIAS\GlobalScreen\Scope\MainMenu\Factory\hasTitle; 5use ILIAS\GlobalScreen\Scope\MainMenu\Factory\isTopItem; 6 7/** 8 * Class TopParentItem 9 * 10 * @author Fabian Schmid <fs@studer-raimann.ch> 11 */ 12class TopParentItem extends AbstractParentItem implements isTopItem, hasTitle 13{ 14 15 /** 16 * @var string 17 */ 18 protected $title = ''; 19 /** 20 * @var string 21 */ 22 protected $icon_path = ''; 23 24 25 /** 26 * @param string $title 27 * 28 * @return TopParentItem 29 */ 30 public function withTitle(string $title) : hasTitle 31 { 32 $clone = clone($this); 33 $clone->title = $title; 34 35 return $clone; 36 } 37 38 39 /** 40 * @inheritDoc 41 */ 42 public function getTitle() : string 43 { 44 return $this->title; 45 } 46} 47