ILIAS  release_7 Revision v7.30-3-g800a261c036
isInterchangeableItemTrait.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
23
29trait isInterchangeableItemTrait
30{
31 public function hasChanged() : bool
32 {
33 $serialized_parent = $this->getParent()->serialize();
34 if ($this instanceof isTopItem) {
35 return $serialized_parent !== '';
36 } elseif ($this instanceof isChild) {
37 return $serialized_parent === '';
38 }
39 return false;
40 }
41}
An exception for terminatinating execution or to throw for unit testing.