I am trying to get the Category name (from the General form settings) for webforms in a preprocess function, ultimately to add as a class to the webform wrapper.

**MYMODULE.module**:

    function MYMODULE_preprocess_webform(&$variables) {
      kint($variables);
    }

Right now I don't see a "category" value in the array structure.

Looks like you can query webforms with a condition on category:

    \Drupal::entityQuery('webform')->condition('category', 'category_name')


How do you get this value in preprocess? Maybe I need a different hook?