code: 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;
      }
docs: Ensure that all options have a value.
  
  @param IAttribute $attribute The options to be cleaned.
  
  @param bool       $onlyUsed  Determines if only "used" values shall be returned.
  
  @return array