Add support for the ProcessedText webform element.
2 unresolved threads
2 unresolved threads
Closes #3474986
Merge request reports
Activity
added 1 commit
- deafda66 - Add support for the ProcessedText webform element.
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, 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