I've got the element with following plain string (result of some kind of side effect):
<drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=myform&1=full&2" token="p8BOEzhVedaNVMwuFKbSbXYvHJtJev-99V8a_12Hv4A"></drupal-render-placeholder>
Which method/function can I call to manually replace this render placeholder with relevant content?
My idea as a workaround is to do this:
/**
* Implements template_preprocess_form_element
*/
function mytheme_preprocess_form_element(&$variables) {
if ($variables['element']['#title'] == 'Specific Title') {
$variables['element']['#value'] = REPLACE_PLACEHOLDER($variables['element']['#value']);
}
}
Note that in $variables['children']
, the placeholder looks in different format for some reason:
<input data-drupal-selector="edit-taps" type="hidden" name="myform" value="1:<drupal-render-placeholder callback="Drupal\block\BlockViewBuilder::lazyBuilder" arguments="0=myform&amp;1=full&amp;2" token="p8BOEzhVedaNVMwuFKbSbXYvHJtJev-99V8a_12Hv4A"></drupal-render-placeholder>:2" />