protected function getTreeValue($type, $value)
    {
        // Convert the selected values.
        if ('' !== $value) {
            $value = StringUtil::trimsplit("\t", $value);

            // Automatically add resources to the DBAFS.
            if ('file' === $type) {
                foreach ($value as $k => $v) {
                    $value[$k] = StringUtil::binToUuid(Dbafs::addResource(\urldecode($v))->uuid);
                }
            }
        }

        return $value;
    }