Skip to content
Snippets Groups Projects

Add support for the ProcessedText webform element.

Merged Pieter Frenssen requested to merge issue/graphql_webform-3474986:3474986-processedtext into 2.x
2 unresolved threads

Closes #3474986

Merge request reports

Approval is optional
Code Quality is loading
Test summary results are being parsed

Merged by Pieter FrenssenPieter Frenssen 8 months ago (Sep 18, 2024 9:38am UTC)

Merge details

  • Changes merged into 2.x with 036fd9bd (commits were squashed).
  • Did not delete the source branch.

Pipeline #286108 passed with warnings

Pipeline passed with warnings for 036fd9bd on 2.x

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
32 * Constructs a new WebformRenderElement data producer.
33 *
34 * @param array $configuration
35 * The plugin configuration.
36 * @param string $pluginId
37 * The plugin ID.
38 * @param mixed $pluginDefinition
39 * The plugin definition.
40 * @param \Drupal\Core\Render\RendererInterface $renderer
41 * The renderer.
42 */
43 public function __construct(
44 array $configuration,
45 $pluginId,
46 $pluginDefinition,
47 protected RendererInterface $renderer,
  • Hasan Atak @hazn started a thread on the diff
  • 65 * Renders the Webform element.
    66 *
    67 * @param array $element
    68 * The Webform element as a render array.
    69 *
    70 * @return string
    71 * The rendered Webform element.
    72 */
    73 public function resolve(array $element): string {
    74 // The Webform module is wrapping its elements in the 'form_element' theme
    75 // wrapper since it is designed to show its forms in the Drupal theming
    76 // layer. Remove the wrapper to render the element as a standalone element.
    77 if (!empty($element['#theme_wrappers'])) {
    78 $element['#theme_wrappers'] = array_diff($element['#theme_wrappers'], ['form_element']);
    79 }
    80 return (string) $this->renderer->renderPlain($element);
    • the code quality tool on git.drupalcode.org had this to say about the line:

      Description
      Call to deprecated method renderPlain() of interface Drupal\Core\Render\RendererInterface: in drupal:10.3.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Render\RendererInterface::renderInIsolation() instead.
      
      File
      src/Plugin/GraphQL/DataProducer/WebformRenderElement.php:80
      
      Tool
      Code Quality
    • Please register or sign in to reply
  • Looks good to me, added a few remarks :smile:

  • Please register or sign in to reply
    Loading