1<?php 2 3use ILIAS\GlobalScreen\Scope\MainMenu\Collector\MainMenuMainCollector as Main; 4use ILIAS\GlobalScreen\Scope\MainMenu\Factory\Item\Lost; 5 6/** 7 * Class ilMMItemFacade 8 * 9 * @author Fabian Schmid <fs@studer-raimann.ch> 10 */ 11class ilMMItemFacade extends ilMMAbstractItemFacade implements ilMMItemFacadeInterface 12{ 13 14 /** 15 * @inheritDoc 16 */ 17 public function __construct(\ILIAS\GlobalScreen\Identification\IdentificationInterface $identification, Main $collector) 18 { 19 parent::__construct($identification, $collector); 20 } 21 22 23 /** 24 * @var string 25 */ 26 protected $type; 27 28 29 /** 30 * @return bool 31 */ 32 public function isCustom() : bool 33 { 34 return false; 35 } 36 37 38 /** 39 * @inheritDoc 40 */ 41 public function isEditable() : bool 42 { 43 return (!$this->gs_item instanceof Lost); 44 } 45 46 47 /** 48 * @inheritDoc 49 */ 50 public function isDeletable() : bool 51 { 52 return ($this->gs_item instanceof Lost); 53 } 54 55 56 57 58 // Setter 59 60 61 /** 62 * @inheritDoc 63 */ 64 public function setType(string $type) 65 { 66 $this->type = $type; 67 } 68 69 70 /** 71 * @inheritDoc 72 */ 73 public function setAction(string $action) 74 { 75 // Setting action not possible for non custom items 76 return; 77 } 78} 79