Add a set category for webform entity list

Created on 23 January 2024, 11 months ago
Updated 5 April 2024, 9 months ago

Problem/Motivation

If you are using the WebformEntityListBuilder programmatically, there is not way to set the category so that it automatically filters on a category.

Steps to reproduce

Programmatically load a webform entity list builder, then try and set the the category.

$entity_type_list = $this->entityTypeManager->getListBuilder('webform');

There currently is no code the set the category so that the form will display with a category already defaulted.

Proposed resolution

Add a setCategory function. Will provide patch.

✨ Feature request
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada ebremner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ebremner
  • πŸ‡¨πŸ‡¦Canada ebremner

    Here is the patch for the set category function

  • πŸ‡¨πŸ‡¦Canada ebremner

    Apparently there was a whitespace issue, redoing patch.

  • Status changed to Closed: won't fix 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    I understand the problem, but this feels like an edge case.

    We will go down the rabbit hole that all query parameters must be configurable.

    I recommend extending the \Drupal\webform\WebformEntityListBuilder and adding the set/get methods as needed.

Production build 0.71.5 2024