public function toArray($complete = true)
    {
        if ($complete) {
            $result = [
                'id' => $this->uuid,
                'nodeType' => $this->nodeType,
                'internal' => $this->internal,
                'shadowLocales' => $this->getShadowLocales(),
                'contentLocales' => $this->getContentLocales(),
                'shadowOn' => $this->getIsShadow(),
                'shadowBaseLanguage' => $this->getShadowBaseLanguage() ?: false,
                'template' => $this->getKey(),
                'hasSub' => $this->hasChildren,
                'creator' => $this->creator,
                'changer' => $this->changer,
                'created' => $this->created,
                'changed' => $this->changed,
            ];

            if (null !== $this->type) {
                $result['type'] = $this->getType()->toArray();
            }

            if (self::NODE_TYPE_INTERNAL_LINK === $this->nodeType) {
                $result['linked'] = 'internal';
            } elseif (self::NODE_TYPE_EXTERNAL_LINK === $this->nodeType) {
                $result['linked'] = 'external';
            }

            $this->appendProperties($this->getProperties(), $result);

            return $result;
        } else {
            $result = [
                'id' => $this->uuid,
                'path' => $this->path,
                'nodeType' => $this->nodeType,
                'internal' => $this->internal,
                'getContentLocales' => $this->getContentLocales(),
                'hasSub' => $this->hasChildren,
                'title' => $this->getProperty('title')->toArray(),
            ];

            if (null !== $this->type) {
                $result['type'] = $this->getType()->toArray();
            }

            if (self::NODE_TYPE_INTERNAL_LINK === $this->nodeType) {
                $result['linked'] = 'internal';
            } elseif (self::NODE_TYPE_EXTERNAL_LINK === $this->nodeType) {
                $result['linked'] = 'external';
            }

            return $result;
        }
    }