I have a View that outputs several fields per row. I'd like to use a preprocess function to add a class to one of the fields, depending on the value of another field. How do I do that in Drupal 8?
Note, I do not want to add a class to the entire row -- just a specific field in that row. The output would be something like:
<div class="views-row"> <div class="views-field field-name-a"> ... </div> <div class="views-field field-name-b has-custom-class"> ... </div> </div>