Skip to content
Snippets Groups Projects

Expose 'storage' as a top-level twig variable

Merged Les Lim requested to merge issue/storage-3217444:3217444-expose-storage-entity into 1.0.x
1 file
+ 1
0
Compare changes
  • Side-by-side
  • Inline
+ 1
0
@@ -22,6 +22,7 @@ use Drupal\Core\Render\Element;
function template_preprocess_storage(array &$variables) {
// Fetch Storage Entity Object.
$storage = $variables['elements']['#storage'];
$variables['storage'] = $storage;
// Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) {
Loading