private function getOptions($attribute, $onlyUsed)
    {
        // Remove empty values.
        $options = [];
        foreach ($attribute->getFilterOptions(null, $onlyUsed) as $key => $value) {
            // Remove html/php tags.
            $value = trim(strip_tags($value));

            if (!empty($value)) {
                $options[$key] = $value;
            }
        }

        return $options;
    }