Commit 0d99a0ca authored by alexpott's avatar alexpott

Issue #2304399 by er.pushpinderrana, undertext | samuel.mortenson: Fixed...

Issue #2304399 by er.pushpinderrana, undertext | samuel.mortenson: Fixed "class" attribute in drupal_render should be an array.
parent ac76e2c5
......@@ -3052,7 +3052,7 @@ function drupal_render_page($page) {
* @code
* array(
* '#theme' => 'image',
* '#attributes' => array('class' => 'foo'),
* '#attributes' => array('class' => array('foo')),
* '#theme_wrappers' => array('container'),
* );
* @endcode
......@@ -3061,10 +3061,10 @@ function drupal_render_page($page) {
* @code
* array(
* '#theme' => 'image',
* '#attributes' => array('class' => 'foo'),
* '#attributes' => array('class' => array('foo')),
* '#theme_wrappers' => array(
* 'container' => array(
* '#attributes' => array('class' => 'bar'),
* '#attributes' => array('class' => array('bar')),
* ),
* ),
* );
......
......@@ -1572,7 +1572,7 @@ function template_preprocess_file_link(&$variables) {
'#uri' => file_icon_url($file_entity, $icon_directory),
'#alt' => (!empty($mime_name[$file->getMimeType()])) ? $mime_name[$file->getMimeType()] : t('File'),
'#title' => String::checkPlain($file_entity->getFilename()),
'#attributes' => array('class' => 'file-icon'),
'#attributes' => array('class' => array('file-icon')),
);
// Set options as per anchor format described at
......
......@@ -66,7 +66,7 @@ function testContainer() {
'#type' => 'container',
'#markup' => 'foo',
'#attributes' => array(
'class' => 'bar',
'class' => array('bar'),
),
), '<div class="bar">foo</div>' . "\n", "#type 'container' with a class HTML attribute");
......
......@@ -85,7 +85,7 @@ function testDrupalRenderBasics() {
'#foo' => 'foo',
'#bar' => 'bar',
'#theme_wrappers' => array('container'),
'#attributes' => array('class' => 'baz'),
'#attributes' => array('class' => array('baz')),
),
'expected' => '<div class="baz">foobar</div>' . "\n",
),
......@@ -98,7 +98,7 @@ function testDrupalRenderBasics() {
'#type' => 'link',
'#theme_wrappers' => array(
'container' => array(
'#attributes' => array('class' => 'baz'),
'#attributes' => array('class' => array('baz')),
),
),
'#attributes' => array('id' => 'foo'),
......@@ -117,7 +117,7 @@ function testDrupalRenderBasics() {
'#title' => 'foo',
'#theme_wrappers' => array(
'container' => array(
'#attributes' => array('class' => 'baz'),
'#attributes' => array('class' => array('baz')),
),
),
),
......@@ -128,10 +128,10 @@ function testDrupalRenderBasics() {
array(
'name' => 'Two #theme_wrappers container hooks with different attributes',
'value' => array(
'#attributes' => array('class' => 'foo'),
'#attributes' => array('class' => array('foo')),
'#theme_wrappers' => array(
'container' => array(
'#attributes' => array('class' => 'bar'),
'#attributes' => array('class' => array('bar')),
),
'container',
),
......@@ -143,7 +143,7 @@ function testDrupalRenderBasics() {
'name' => '#theme_wrappers implements an array style theme hook suggestion',
'value' => array(
'#theme_wrappers' => array(array('container')),
'#attributes' => array('class' => 'foo'),
'#attributes' => array('class' => array('foo')),
),
'expected' => '<div class="foo"></div>' . "\n",
),
......
......@@ -48,7 +48,7 @@ public function tourTest1($locale = 'foo') {
'tip-5' => array(
'#type' => 'container',
'#attributes' => array(
'class' => 'tour-test-5',
'class' => array('tour-test-5'),
),
'#children' => t('Tip created later?'),
),
......
......@@ -151,7 +151,7 @@ function views_ui_preprocess_views_view(&$variables) {
'#section' => $section,
'#content' => $variables[$section],
'#theme_wrappers' => array('views_ui_container'),
'#attributes' => array('class' => 'contextual-region'),
'#attributes' => array('class' => array('contextual-region')),
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment