Skip to content

Instantly share code, notes, and snippets.

@joelpittet
Last active December 16, 2015 04:48
Show Gist options
  • Save joelpittet/5379755 to your computer and use it in GitHub Desktop.
Save joelpittet/5379755 to your computer and use it in GitHub Desktop.
Render array from test
<?php
array (
0 => array(
'label' => 'Drupal core',
'projects' => array(
'drupal' => array(
'attributes' =>
Drupal\Core\Template\Attribute::__set_state(array(
'storage' => array(
'class' =>
Drupal\Core\Template\AttributeString::__set_state(array(
'printed' => false,
'value' => 'ok',
'name' => 'class',
)),
),
)),
'icon' => array(
'#theme' => 'image',
'#uri' => 'core/misc/watchdog-ok.png',
'#width' => 18,
'#height' => 18,
'#alt' => 'ok',
'#title' => 'ok',
),
'status_label' => array(
'#theme' => 'update_status_label',
'#status' => 5,
),
'title' => '<a href="http://example.com/project/drupal">Drupal</a>',
'existing_version' => '7.0',
'extra' => array(
),
'includes' => '<em class="placeholder">Datetime, Entity, Field, Field SQL Storage, File, Filter, Menu Link, Node, System, Text, Update Manager, User</em>',
),
),
),
1 => array(
'label' => 'Themes',
'projects' => array(
'update test base theme' => array(
'attributes' =>
Drupal\Core\Template\Attribute::__set_state(array(
'storage' => array(
'class' =>
Drupal\Core\Template\AttributeString::__set_state(array(
'printed' => false,
'value' => 'error',
'name' => 'class',
)),
),
)),
'icon' => array(
'#theme' => 'image',
'#uri' => 'core/misc/watchdog-error.png',
'#width' => 18,
'#height' => 18,
'#alt' => 'error',
'#title' => 'error',
),
'status_label' => array(
'#theme' => 'update_status_label',
'#status' => 1,
),
'title' => '<a href="http://example.com/project/update_test_basetheme">Update test base theme</a>',
'existing_version' => '8.x-1.0',
'versions' => array(
0 => array(
'#theme' => 'update_version',
'#version' => array(
'name' => 'update_test_basetheme 8.x-1.1',
'version' => '8.x-1.1',
'tag' => 'DRUPAL-7--1-1',
'version_major' => '1',
'version_patch' => '1',
'status' => 'published',
'release_link' => 'http://example.com/update_test_basetheme-7-x-1-1-release',
'download_link' => 'http://example.com/update_test_basetheme-8.x-1.1.tar.gz',
'date' => '1250624521',
'mdhash' => 'b966255555d9c9b86d480ca08cfaa98e',
'filesize' => '1073763241',
'terms' => array(
'Release type' => array(
0 => 'Security update',
1 => 'New features',
2 => 'Bug fixes',
),
),
),
'#tag' => 'Security update:',
'#class' => array(
0 => 'version-recommended',
1 => 'version-recommended-strong',
2 => 'version-security',
),
),
),
'extra' => array(
),
'includes' => '<em class="placeholder">Update test base theme</em>',
'sub_themes' => array(
0 => 'Update test subtheme',
),
),
'update test subtheme' => array(
'attributes' =>
Drupal\Core\Template\Attribute::__set_state(array(
'storage' => array(
'class' =>
Drupal\Core\Template\AttributeString::__set_state(array(
'printed' => false,
'value' => 'ok',
'name' => 'class',
)),
),
)),
'icon' => array(
'#theme' => 'image',
'#uri' => 'core/misc/watchdog-ok.png',
'#width' => 18,
'#height' => 18,
'#alt' => 'ok',
'#title' => 'ok',
),
'status_label' => array(
'#theme' => 'update_status_label',
'#status' => 5,
),
'title' => '<a href="http://example.com/project/update_test_subtheme">Update test subtheme</a>',
'existing_version' => '8.x-1.0',
'extra' => array(
),
'includes' => '<em class="placeholder">Update test subtheme</em>',
'base_themes' => array(
0 => '<em class="placeholder">Update test base theme</em> (Array)',
),
),
),
),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment