There is no existing module that can directly help achieve this. However, it can be achieved by writing a custom filter plugin.
Here's a general outline of how this can be done:
Create a custom filter plugin that extends the existing search_api filter plugin.
In the plugin, add a new option to the filter configuration form that allows the user to select whether or not the filter should be dependent on the value of the checkbox in the category taxonomy terms.
Use the Views API to add a relationship to the referenced entity (the category taxonomy term) in the view.
Use the relationship to get the value of the checkbox for the current category taxonomy term.
Based on the value of the checkbox, either apply or expose the language filter.
Here's an example of how the custom module code might look like:
use Drupal\views\Plugin\views\filter\SearchApiFilter;
/**
* Provides a custom filter plugin for downloads view.
*
* @ViewsFilter("downloads_custom_filter")
*/
class DownloadsCustomFilter extends SearchApiFilter {
/**
* {@inheritdoc}
*/
public function exposeOptions() {
$options = parent::exposeOptions();
$options['custom_dependent'] = array('default' => FALSE);
return $options;
}
/**
* {@inheritdoc}
*/
public function query() {
$dependent = $this->options['custom_dependent'];
$term_field = $this->definition['term_field'];
if ($dependent) {
// Add relationship to the referenced category entity.
$this->query->addRelationship('field_category', [
'plugin_id' => 'standard',
'base' => $this->definition['entity_type'],
'field' => $term_field,
'label' => $this->t('Category'),
]);
// Get the value of the checkbox for the current category term.
$checkbox_value = $this->query->addExpression("field_category.field_checkbox_value", 'checkbox_value');
if ($checkbox_value == TRUE) {
// Apply the language filter.
parent::query();
}
else {
// Expose the language filter to the user.
$this->query->addExposedFilter('language');
}
}
else {
// Apply the language filter.
parent::query();
}
}
}
After creating the custom module, you can enable it and add the new filter plugin to your downloads view. You can then configure the filter to be dependent on the value of the checkbox in the category taxonomy terms.
I hope this could help!