Mercurial > hg > isophonics-drupal-site
comparison core/modules/image/tests/src/Functional/ImageDimensionsTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
284 } | 284 } |
285 | 285 |
286 /** | 286 /** |
287 * Render an image style element. | 287 * Render an image style element. |
288 * | 288 * |
289 * drupal_render() alters the passed $variables array by adding a new key | 289 * Function drupal_render() alters the passed $variables array by adding a new |
290 * '#printed' => TRUE. This prevents next call to re-render the element. We | 290 * key '#printed' => TRUE. This prevents next call to re-render the element. |
291 * wrap drupal_render() in a helper protected method and pass each time a | 291 * We wrap drupal_render() in a helper protected method and pass each time a |
292 * fresh array so that $variables won't get altered and the element is | 292 * fresh array so that $variables won't get altered and the element is |
293 * re-rendered each time. | 293 * re-rendered each time. |
294 */ | 294 */ |
295 protected function getImageTag($variables) { | 295 protected function getImageTag($variables) { |
296 return str_replace("\n", NULL, \Drupal::service('renderer')->renderRoot($variables)); | 296 return str_replace("\n", NULL, \Drupal::service('renderer')->renderRoot($variables)); |