protected function getSetterValue($key, $value)
    {
        if (empty($value)) {
            return;
        }

        switch ($key) {
            case 'redirectTarget':
                $value = $this->documentManager->find($value);
                break;
            case 'permissions':
                $value = json_decode($value, true);
                break;
            case 'navigationContexts':
                $value = json_decode($value);
                break;
        }

        return $value;
    }