diff --git a/core/includes/theme.inc b/core/includes/theme.inc index cb62241..d7f22a7 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1041,10 +1041,10 @@ function theme_disable($theme_list) { * @return string * The rendered inline template. */ -function drupal_render_twig_inline(&$element) { +function drupal_render_inline_template(&$element) { /** @var \Drupal\Core\Template\TwigEnvironment $environment */ $environment = \Drupal::service('twig'); - $markup = $environment->renderInlineTemplate($element['#template'], $element['#context']); + $markup = $environment->renderInline($element['#template'], $element['#context']); $element['#markup'] = $markup; return $element; } diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index f0a8050..6c2f673 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -211,7 +211,7 @@ public function getTemplateClass($name, $index = NULL, $inline = FALSE) { /** * Renders a twig string directly. * - * Warning: You should use the render element 'twig_inline' together with + * Warning: You should use the render element 'inline_template' together with * the #template attribute instead of this method directly. * On top of that you have to ensure that the template string is not dynamic * but just an ordinary static php string, because there may be installations @@ -228,7 +228,7 @@ public function getTemplateClass($name, $index = NULL, $inline = FALSE) { * @return string * The rendered inline template. */ - public function renderInlineTemplate($template_string, array $context = array()) { + public function renderInline($template_string, array $context = array()) { return $this->loadTemplate($template_string, NULL, TRUE)->render($context); } diff --git a/core/modules/field_ui/src/DisplayOverviewBase.php b/core/modules/field_ui/src/DisplayOverviewBase.php index 574900e..c3e9672 100644 --- a/core/modules/field_ui/src/DisplayOverviewBase.php +++ b/core/modules/field_ui/src/DisplayOverviewBase.php @@ -405,7 +405,7 @@ protected function buildFieldRow(FieldDefinitionInterface $field_definition, Ent if (!empty($summary)) { $field_row['settings_summary'] = array( - '#type' => 'twig_inline', + '#type' => 'inline_template', '#template' => '
{{ query }}', '#context' => array('query' => strtr($query_string, $quoted)))), + array('data' => array('#type' => 'inline_template', '#template' => "{% trans 'Query' %}")), + array('data' => array('#type' => 'inline_template', '#template' => '
{{ query }}', '#context' => array('query' => strtr($query_string, $quoted)))), ); if (!empty($this->additionalQueries)) { $queries = '' . t('These queries were run during view rendering:') . ''; @@ -693,14 +693,14 @@ public function renderPreview($display_id, $args = array()) { } $rows['query'][] = array( - array('data' => array('#type' => 'twig_inline', '#template' => "{% trans 'Other queries' %}")), + array('data' => array('#type' => 'inline_template', '#template' => "{% trans 'Other queries' %}")), SafeMarkup::set('
' . $queries . ''), ); } } if ($show_info) { $rows['query'][] = array( - array('data' => array('#type' => 'twig_inline', '#template' => "{% trans 'Title' %}")), + array('data' => array('#type' => 'inline_template', '#template' => "{% trans 'Title' %}")), Xss::filterAdmin($this->executable->getTitle()), ); if (isset($path)) {