public function buildFilters($parameters) {
    $filters_markup = '';

    $locationOptions = $this->getLocationOptions();
    $programOptions = $this->getProgramOptions();
    $categoryOptions = $this->getCategoryOptions();
    $classOptions = $this->getClassOptions();
    $timeOptions = $this->getTimeOptions();

    if ($parameters['location'] !== 'All') {
      if (!empty($locationOptions['branches'][$parameters['location']])) {
        $filters[$parameters['location']] = $locationOptions['branches'][$parameters['location']];
      }
      if (!empty($locationOptions['camps'][$parameters['location']])) {
        $filters[$parameters['location']] = $locationOptions['camps'][$parameters['location']];
      }
    }
    if ($parameters['program'] !== 'all' && !empty($programOptions[$parameters['program']])) {
      $filters[$parameters['program']] = $programOptions[$parameters['program']];
    }
    if ($parameters['category'] !== 'all' && !empty($categoryOptions[$parameters['category']])) {
      $filters[$parameters['category']] = $categoryOptions[$parameters['category']];
    }
    if ($parameters['class'] !== 'all' && !empty($classOptions[$parameters['class']])) {
      $filters[$parameters['class']] = $classOptions[$parameters['class']];
    }
    if (!empty($parameters['date'])) {
      $filters[$parameters['date']] = $parameters['date'];
    }
    if ($parameters['time'] !== 'all' && !empty($timeOptions[$parameters['time']])) {
      $filters[$parameters['time']] = $timeOptions[$parameters['time']];
    }
    if (!empty($filters)) {
      $filters_markup = [
        '#theme' => 'openy_schedules_subcategory_filters',
        '#filters' => $filters,
      ];
    }

    return $filters_markup;
  }