public function renderInput($data = '', array $options = []) : string
    {
        $options = array_merge($this->defaultOptions, $this->fixOptions($options));

        $data = $this->getFieldValueFromData($data, $options);
        // Workaround for BLOBs
        if (is_resource($data)) {
            $data = stream_get_contents($data);
        }

        if (empty($data) && !empty($options['default'])) {
            $data = $options['default'];
        }

        $options['label'] = !isset($options['label']) ? $this->renderName() : $options['label'];

        $searchOptions = $this->config->getProvider('renderInput');
        $searchOptions = new $searchOptions($this->config);
        $result = $searchOptions->provide($data, $options);

        return $result;
    }