summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAlex Pott2013-06-22 19:49:22 (GMT)
committerAlex Pott2013-06-22 19:49:22 (GMT)
commit088b191c90faff6627e5ad5c1355f73b0fa70ff6 (patch)
tree8b33ceb665a63567ffe1f323442e904b57577785 /core
parent972bdf17b5c4d6d4af62ce7e3c1ff41ea7594854 (diff)
Issue #1828536 by sun, thedavidmeister, benjf, derek.deraps, jenlampton, dcam, pwieck: Rename 'type' variable of theme_item_list() to 'list_type'.
Diffstat (limited to 'core')
-rw-r--r--core/includes/theme.inc13
-rw-r--r--core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php2
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php2
-rw-r--r--core/modules/tour/lib/Drupal/tour/TourRenderController.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php2
-rw-r--r--core/modules/views/views.theme.inc2
8 files changed, 13 insertions, 14 deletions
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 79360fe..45737c5 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2275,7 +2275,7 @@ function template_preprocess_item_list(&$variables) {
}
// Lastly, inherit the original theme variables of the current list.
$child['#theme'] = $variables['theme_hook_original'];
- $child['#type'] = $variables['type'];
+ $child['#list_type'] = $variables['list_type'];
}
}
}
@@ -2291,19 +2291,18 @@ function template_preprocess_item_list(&$variables) {
* render arrays. Render arrays can specify list item attributes in the
* #wrapper_attributes property.
* - title: The title of the list.
- * - type: The type of list to return (e.g. "ul", "ol").
+ * - list_type: The type of HTML list (e.g. "ul", "ol").
* - attributes: The attributes applied to the list element.
*/
function theme_item_list($variables) {
$items = $variables['items'];
$title = (string) $variables['title'];
- // @todo 'type' clashes with '#type'. Rename to 'tag'.
- $type = $variables['type'];
+ $list_type = $variables['list_type'];
$list_attributes = $variables['attributes'];
$output = '';
if ($items) {
- $output .= '<' . $type . new Attribute($list_attributes) . '>';
+ $output .= '<' . $list_type . new Attribute($list_attributes) . '>';
$num_items = count($items);
$i = 0;
@@ -2325,7 +2324,7 @@ function theme_item_list($variables) {
}
$output .= '<li' . new Attribute($attributes) . '>' . $item . '</li>';
}
- $output .= "</$type>";
+ $output .= "</$list_type>";
}
// Only output the list container and title, if there are any list items.
@@ -3130,7 +3129,7 @@ function drupal_common_theme() {
'variables' => array('mark_type' => MARK_NEW),
),
'item_list' => array(
- 'variables' => array('items' => array(), 'title' => '', 'type' => 'ul', 'attributes' => array()),
+ 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array()),
),
'more_help_link' => array(
'variables' => array('url' => NULL),
diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
index 1342ec5..0ae63b7 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php
@@ -629,7 +629,7 @@ class Field extends FieldPluginBase {
array(
'items' => $items,
'title' => NULL,
- 'type' => $this->options['multi_type']
+ 'list_type' => $this->options['multi_type'],
));
}
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
index 1faf6d8..d8505bc 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
@@ -54,7 +54,7 @@ class FunctionsTest extends WebTestBase {
'childlist' => array(
'#theme' => 'item_list',
'#attributes' => array('id' => 'blist'),
- '#type' => 'ol',
+ '#list_type' => 'ol',
'#items' => array(
'ba',
array(
diff --git a/core/modules/tour/lib/Drupal/tour/TourRenderController.php b/core/modules/tour/lib/Drupal/tour/TourRenderController.php
index 163882d..aea0d33 100644
--- a/core/modules/tour/lib/Drupal/tour/TourRenderController.php
+++ b/core/modules/tour/lib/Drupal/tour/TourRenderController.php
@@ -56,7 +56,7 @@ class TourRenderController extends EntityRenderController {
$build[$entity_id] = array(
'#theme' => 'item_list',
'#items' => $list_items,
- '#type' => 'ol',
+ '#list_type' => 'ol',
'#attributes' => array(
'id' => 'tour',
'class' => array(
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
index 4d13ee8..64b337e 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
@@ -1705,7 +1705,7 @@ abstract class DisplayPluginBase extends PluginBase {
$item_list = array(
'#theme' => 'item_list',
'#items' => $items,
- '#type' => $type,
+ '#list_type' => $type,
);
$output .= drupal_render($item_list);
}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
index e14b009..386eda0 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
@@ -873,7 +873,7 @@ If you would like to have the characters \'[\' and \']\' use the html entity cod
$item_list = array(
'#theme' => 'item_list',
'#items' => $items,
- '#type' => $type,
+ '#list_type' => $type,
);
$output .= drupal_render($item_list);
}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php
index 01ee041..ca2021c 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/PrerenderList.php
@@ -83,7 +83,7 @@ class PrerenderList extends FieldPluginBase {
'#theme' => 'item_list',
'#items' => $items,
'#title' => NULL,
- '#type' => $this->options['type'],
+ '#list_type' => $this->options['type'],
);
return drupal_render($item_list);
}
diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc
index 44403dd..627e8ed 100644
--- a/core/modules/views/views.theme.inc
+++ b/core/modules/views/views.theme.inc
@@ -1201,7 +1201,7 @@ function theme_views_mini_pager($vars) {
'#theme' => 'item_list',
'#items' => $items,
'#title' => NULL,
- '#type' => 'ul',
+ '#list_type' => 'ul',
'#attributes' => array(
'class' => array('pager'),
),