75 if ($this->childNodes !==
null) {
76 unset($this->childNodes);
77 $this->childNodes =
null;
98 if ($this->childNodes !==
null) {
152 return $this->
id == $other->getId();
171 return $this->
id > $other->getId() ? 1 : -1;
180 public function toArray($addChildNodes =
true)
182 $arrayRepresentation = [
183 'serializeClassName' => static::class,
186 if ($this->parentNode !==
null) {
187 $arrayRepresentation[
'parentNode'] = $this->parentNode->toArray(
false);
189 $arrayRepresentation[
'parentNode'] =
'';
192 $arrayRepresentation[
'childNodes'] = $this->childNodes->toArray();
194 $arrayRepresentation[
'childNodes'] =
'';
196 return $arrayRepresentation;
206 $this->
setId($data[
'id']);
207 if (isset($data[
'parentNode']) && $data[
'parentNode'] !==
'') {
208 $this->
setParentNode(GeneralUtility::makeInstance($data[
'parentNode'][
'serializeClassName'], $data[
'parentNode']));
210 if (isset($data[
'childNodes']) && $data[
'childNodes'] !==
'') {
211 $this->
setChildNodes(GeneralUtility::makeInstance($data[
'childNodes'][
'serializeClassName'], $data[
'childNodes']));
234 if ($arrayRepresentation[
'serializeClassName'] !== static::class) {
235 throw new \TYPO3\CMS\Core\Exception(
'Deserialized object type is not identical!', 1294586646);