public function setValue($value)
    {
        $definition = $this->propertyType->getDefinition();
        if (isset($definition['hierarchical']) && $definition['hierarchical']) {
            $this->value = [];
            foreach ($value as $v) {
                foreach ($v['value'] as $itemValue) {
                    $this->value[] = $this->convertValue($itemValue['value']);
                }
            }
        } elseif (!empty($definition['array'])) {
            if (empty($definition['multiplechoice']) && isset($definition['options']) && is_array($definition['options'])) {
                $this->value = $this->convertValue(current($value)['value']);
            } else {
                $this->value = [];
                foreach ($value as $v) {
                    $this->value[] = $this->convertValue($v['value']);
                }
            }
        } else {
            $this->value = $this->convertValue($value);
        }

        return $this;
    }