Commit 8d196a79 authored by catch's avatar catch

Issue #2348729 by Manuel Garcia, joelpittet, akalata, subhojit777, Cottser,...

Issue #2348729 by Manuel Garcia, joelpittet, akalata, subhojit777, Cottser, rpayanm: Convert theme_views_view_field to twig
parent 2d1f4274
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
* @file * @file
* Default theme implementation for a single field in a view. * Default theme implementation for a single field in a view.
* *
* It is not actually used in default views, as this is registered as a theme
* function which has better performance. For single overrides, the template is
* perfectly okay.
*
* Available variables: * Available variables:
* - view: The view that the field belongs to. * - view: The view that the field belongs to.
* - field: The field handler that can process the input. * - field: The field handler that can process the input.
...@@ -24,4 +20,4 @@ ...@@ -24,4 +20,4 @@
* @ingroup themeable * @ingroup themeable
*/ */
#} #}
{{ output }} {{ output -}}
...@@ -133,7 +133,6 @@ function views_theme($existing, $type, $theme, $path) { ...@@ -133,7 +133,6 @@ function views_theme($existing, $type, $theme, $path) {
// Default view themes // Default view themes
$hooks['views_view_field'] = $base + array( $hooks['views_view_field'] = $base + array(
'variables' => array('view' => NULL, 'field' => NULL, 'row' => NULL), 'variables' => array('view' => NULL, 'field' => NULL, 'row' => NULL),
'function' => 'theme_views_view_field',
); );
$hooks['views_view_grouping'] = $base + array( $hooks['views_view_grouping'] = $base + array(
'variables' => array('view' => NULL, 'grouping' => NULL, 'grouping_level' => NULL, 'rows' => NULL, 'title' => NULL), 'variables' => array('view' => NULL, 'grouping' => NULL, 'grouping_level' => NULL, 'rows' => NULL, 'title' => NULL),
......
...@@ -208,19 +208,6 @@ function template_preprocess_views_view_grouping(&$variables) { ...@@ -208,19 +208,6 @@ function template_preprocess_views_view_grouping(&$variables) {
$variables['content'] = $variables['view']->style_plugin->renderGroupingSets($variables['rows'], $variables['grouping_level']); $variables['content'] = $variables['view']->style_plugin->renderGroupingSets($variables['rows'], $variables['grouping_level']);
} }
/**
* Display a single views field.
*
* Interesting bits of info:
* $field->field_alias says what the raw value in $row will be. Reach it like
* this: @code { $row->{$field->field_alias} @endcode
*
* @ingroup themeable
*/
function theme_views_view_field($variables) {
return $variables['output'];
}
/** /**
* Prepares variables for views field templates. * Prepares variables for views field templates.
* *
......
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