Issue #2036087 by YesCT: Add public identifier to all render methods in all views plugins in core.

8.0.x
Alex Pott 2013-07-15 18:39:32 -04:00
parent 0a7db6bd93
commit 31efff2728
64 changed files with 64 additions and 64 deletions

View File

@ -57,7 +57,7 @@ class TitleLink extends FieldPluginBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -71,7 +71,7 @@ class Rss extends RowPluginBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
function render($row) { public function render($row) {
$entity = $row->_entity; $entity = $row->_entity;
$item = new \stdClass(); $item = new \stdClass();

View File

@ -79,7 +79,7 @@ class Comment extends FieldPluginBase {
return $data; return $data;
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -22,7 +22,7 @@ class Depth extends FieldPluginBase {
/** /**
* Work out the depth of this comment * Work out the depth of this comment
*/ */
function render($values) { public function render($values) {
$comment_thread = $this->getValue($values); $comment_thread = $this->getValue($values);
return count(explode('.', $comment_thread)) - 1; return count(explode('.', $comment_thread)) - 1;
} }

View File

@ -30,7 +30,7 @@ class LastTimestamp extends Date {
$this->additional_fields['comment_count'] = 'comment_count'; $this->additional_fields['comment_count'] = 'comment_count';
} }
function render($values) { public function render($values) {
$comment_count = $this->getValue($values, 'comment_count'); $comment_count = $this->getValue($values, 'comment_count');
if (empty($this->options['empty_zero']) || $comment_count) { if (empty($this->options['empty_zero']) || $comment_count) {
return parent::render($values); return parent::render($values);

View File

@ -42,7 +42,7 @@ class Link extends FieldPluginBase {
public function query() {} public function query() {}
function render($values) { public function render($values) {
$comment = $this->getEntity($values); $comment = $this->getEntity($values);
return $this->render_link($comment, $values); return $this->render_link($comment, $values);
} }

View File

@ -56,7 +56,7 @@ class NcsLastCommentName extends FieldPluginBase {
return $options; return $options;
} }
function render($values) { public function render($values) {
if (!empty($this->options['link_to_user'])) { if (!empty($this->options['link_to_user'])) {
$account = entity_create('user', array()); $account = entity_create('user', array());
$account->name = $this->getValue($values); $account->name = $this->getValue($values);

View File

@ -19,7 +19,7 @@ use Drupal\Component\Annotation\PluginID;
*/ */
class NodeComment extends FieldPluginBase { class NodeComment extends FieldPluginBase {
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
switch ($value) { switch ($value) {
case COMMENT_NODE_HIDDEN: case COMMENT_NODE_HIDDEN:

View File

@ -38,7 +38,7 @@ class NodeLink extends FieldPluginBase {
public function query() {} public function query() {}
function render($values) { public function render($values) {
$node = $this->getEntity($values); $node = $this->getEntity($values);
comment_node_view($node, $this->options['teaser'] ? 'teaser' : 'full'); comment_node_view($node, $this->options['teaser'] ? 'teaser' : 'full');

View File

@ -142,7 +142,7 @@ class NodeNewComments extends Numeric {
return $data; return $data;
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if (!empty($value)) { if (!empty($value)) {
return $this->render_link(parent::render($values), $values); return $this->render_link(parent::render($values), $values);

View File

@ -65,7 +65,7 @@ class Username extends FieldPluginBase {
} }
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -40,7 +40,7 @@ class CommentRow extends EntityRow {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
function render($row) { public function render($row) {
$entity_id = $row->{$this->field_alias}; $entity_id = $row->{$this->field_alias};
$build = $this->build[$entity_id]; $build = $this->build[$entity_id];
if (!$this->options['links']) { if (!$this->options['links']) {

View File

@ -87,7 +87,7 @@ class Rss extends RowPluginBase {
return $options; return $options;
} }
function render($row) { public function render($row) {
global $base_url; global $base_url;
$cid = $row->{$this->field_alias}; $cid = $row->{$this->field_alias};

View File

@ -44,7 +44,7 @@ class TranslationLink extends FieldPluginBase {
/** /**
* Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render(). * Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().
*/ */
function render($values) { public function render($values) {
return $this->render_link($this->getEntity($values), $values); return $this->render_link($this->getEntity($values), $values);
} }

View File

@ -68,7 +68,7 @@ class ContextualLinks extends FieldPluginBase {
* @see contextual_preprocess() * @see contextual_preprocess()
* @see contextual_contextual_links_view_alter() * @see contextual_contextual_links_view_alter()
*/ */
function render($values) { public function render($values) {
$links = array(); $links = array();
foreach ($this->options['fields'] as $field) { foreach ($this->options['fields'] as $field) {
$rendered_field = $this->view->style_plugin->getField($this->view->row_index, $field); $rendered_field = $this->view->style_plugin->getField($this->view->row_index, $field);

View File

@ -41,7 +41,7 @@ class Extension extends FieldPluginBase {
); );
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if (!$this->options['extension_detect_tar']) { if (!$this->options['extension_detect_tar']) {
if (preg_match('/\.([^\.]+)$/', $value, $match)) { if (preg_match('/\.([^\.]+)$/', $value, $match)) {

View File

@ -65,7 +65,7 @@ class File extends FieldPluginBase {
return $data; return $data;
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -33,7 +33,7 @@ class FileMime extends File {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
} }
function render($values) { public function render($values) {
$data = $values->{$this->field_alias}; $data = $values->{$this->field_alias};
if (!empty($this->options['filemime_image']) && $data !== NULL && $data !== '') { if (!empty($this->options['filemime_image']) && $data !== NULL && $data !== '') {
$fake_file = (object) array('filemime' => $data); $fake_file = (object) array('filemime' => $data);

View File

@ -19,7 +19,7 @@ use Drupal\views\Plugin\views\field\FieldPluginBase;
*/ */
class Status extends FieldPluginBase { class Status extends FieldPluginBase {
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return _views_file_status($value); return _views_file_status($value);
} }

View File

@ -32,7 +32,7 @@ class Uri extends File {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
} }
function render($values) { public function render($values) {
$data = $values->{$this->field_alias}; $data = $values->{$this->field_alias};
if (!empty($this->options['file_download_path']) && $data !== NULL && $data !== '') { if (!empty($this->options['file_download_path']) && $data !== NULL && $data !== '') {
$data = file_create_url($data); $data = file_create_url($data);

View File

@ -68,7 +68,7 @@ class HistoryUserTimestamp extends Node {
parent::query(); parent::query();
} }
function render($values) { public function render($values) {
// Let's default to 'read' state. // Let's default to 'read' state.
// This code shadows node_mark, but it reads from the db directly and // This code shadows node_mark, but it reads from the db directly and
// we already have that info. // we already have that info.

View File

@ -36,7 +36,7 @@ class LanguageField extends FieldPluginBase {
); );
} }
function render($values) { public function render($values) {
// @todo: Drupal Core dropped native language until config translation is // @todo: Drupal Core dropped native language until config translation is
// ready, see http://drupal.org/node/1616594. // ready, see http://drupal.org/node/1616594.
$value = $this->getValue($values); $value = $this->getValue($values);

View File

@ -36,7 +36,7 @@ class Language extends Node {
); );
} }
function render($values) { public function render($values) {
// @todo: Drupal Core dropped native language until config translation is // @todo: Drupal Core dropped native language until config translation is
// ready, see http://drupal.org/node/1616594. // ready, see http://drupal.org/node/1616594.
$value = $this->getValue($values); $value = $this->getValue($values);

View File

@ -45,7 +45,7 @@ class Link extends FieldPluginBase {
$this->addAdditionalFields(); $this->addAdditionalFields();
} }
function render($values) { public function render($values) {
if ($entity = $this->getEntity($values)) { if ($entity = $this->getEntity($values)) {
return $this->render_link($entity, $values); return $this->render_link($entity, $values);
} }

View File

@ -86,7 +86,7 @@ class Node extends FieldPluginBase {
return $data; return $data;
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -53,7 +53,7 @@ class Path extends FieldPluginBase {
$this->addAdditionalFields(); $this->addAdditionalFields();
} }
function render($values) { public function render($values) {
$nid = $this->getValue($values, 'nid'); $nid = $this->getValue($values, 'nid');
return url("node/$nid", array('absolute' => $this->options['absolute'])); return url("node/$nid", array('absolute' => $this->options['absolute']));
} }

View File

@ -51,7 +51,7 @@ class Type extends Node {
return $this->sanitizeValue($data); return $this->sanitizeValue($data);
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->render_name($value, $values), $values); return $this->render_link($this->render_name($value, $values), $values);
} }

View File

@ -89,7 +89,7 @@ class Rss extends RowPluginBase {
} }
} }
function render($row) { public function render($row) {
// For the most part, this code is taken from node_feed() in node.module // For the most part, this code is taken from node_feed() in node.module
global $base_url; global $base_url;

View File

@ -80,7 +80,7 @@ class Score extends Numeric {
} }
} }
function render($values) { public function render($values) {
// Only render if we exist. // Only render if we exist.
if (isset($this->tableAlias)) { if (isset($this->tableAlias)) {
return parent::render($values); return parent::render($values);

View File

@ -42,7 +42,7 @@ class SearchRow extends RowPluginBase {
/** /**
* Override the behavior of the render() function. * Override the behavior of the render() function.
*/ */
function render($row) { public function render($row) {
return array( return array(
'#theme' => $this->themeFunctions(), '#theme' => $this->themeFunctions(),
'#view' => $this->view, '#view' => $this->view,

View File

@ -53,7 +53,7 @@ class LinkEdit extends FieldPluginBase {
$this->addAdditionalFields(); $this->addAdditionalFields();
} }
function render($values) { public function render($values) {
// Check there is an actual value, as on a relationship there may not be. // Check there is an actual value, as on a relationship there may not be.
if ($tid = $this->getValue($values, 'tid')) { if ($tid = $this->getValue($values, 'tid')) {
// Mock a term object for taxonomy_term_access(). Use machine name and // Mock a term object for taxonomy_term_access(). Use machine name and

View File

@ -87,7 +87,7 @@ class Taxonomy extends FieldPluginBase {
return $data; return $data;
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -38,7 +38,7 @@ class Language extends User {
return $this->sanitizeValue($lang->name); return $this->sanitizeValue($lang->name);
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -59,7 +59,7 @@ class Link extends FieldPluginBase {
/** /**
* Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render(). * Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().
*/ */
function render($values) { public function render($values) {
return $this->render_link($this->getEntity($values), $values); return $this->render_link($this->getEntity($values), $values);
} }

View File

@ -60,7 +60,7 @@ class User extends FieldPluginBase {
return $data; return $data;
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values); return $this->render_link($this->sanitizeValue($value), $values);
} }

View File

@ -77,7 +77,7 @@ class UserData extends FieldPluginBase {
/** /**
* Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render(). * Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().
*/ */
function render($values) { public function render($values) {
$uid = $this->getValue($values); $uid = $this->getValue($values);
$data = $this->userData->get($this->options['data_module'], $uid, $this->options['data_name']); $data = $this->userData->get($this->options['data_module'], $uid, $this->options['data_name']);

View File

@ -91,7 +91,7 @@ class Entity extends TokenizeAreaPluginBase {
/** /**
* Overrides \Drupal\views\Plugin\views\area\AreaPluginBase::render(). * Overrides \Drupal\views\Plugin\views\area\AreaPluginBase::render().
*/ */
function render($empty = FALSE) { public function render($empty = FALSE) {
if (!$empty || !empty($this->options['empty'])) { if (!$empty || !empty($this->options['empty'])) {
$entity_id = $this->tokenizeValue($this->options['entity_id']); $entity_id = $this->tokenizeValue($this->options['entity_id']);
if ($entity = entity_load($this->entityType, $entity_id)) { if ($entity = entity_load($this->entityType, $entity_id)) {

View File

@ -58,7 +58,7 @@ class Result extends AreaPluginBase {
/** /**
* Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render(). * Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render().
*/ */
function render($empty = FALSE) { public function render($empty = FALSE) {
// Must have options and does not work on summaries. // Must have options and does not work on summaries.
if (!isset($this->options['content']) || $this->view->plugin_name == 'default_summary') { if (!isset($this->options['content']) || $this->view->plugin_name == 'default_summary') {
return array(); return array();

View File

@ -52,7 +52,7 @@ class Text extends TokenizeAreaPluginBase {
/** /**
* Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render(). * Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render().
*/ */
function render($empty = FALSE) { public function render($empty = FALSE) {
$format = isset($this->options['format']) ? $this->options['format'] : filter_default_format(); $format = isset($this->options['format']) ? $this->options['format'] : filter_default_format();
if (!$empty || !empty($this->options['empty'])) { if (!$empty || !empty($this->options['empty'])) {
return array( return array(

View File

@ -43,7 +43,7 @@ class TextCustom extends TokenizeAreaPluginBase {
/** /**
* Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render(). * Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render().
*/ */
function render($empty = FALSE) { public function render($empty = FALSE) {
if (!$empty || !empty($this->options['empty'])) { if (!$empty || !empty($this->options['empty'])) {
return array( return array(
'#markup' => $this->renderTextarea($this->options['content']), '#markup' => $this->renderTextarea($this->options['content']),

View File

@ -56,7 +56,7 @@ class View extends AreaPluginBase {
/** /**
* Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render(). * Implements \Drupal\views\Plugin\views\area\AreaPluginBase::render().
*/ */
function render($empty = FALSE) { public function render($empty = FALSE) {
if (!empty($this->options['view_to_insert'])) { if (!empty($this->options['view_to_insert'])) {
list($view_name, $display_id) = explode(':', $this->options['view_to_insert']); list($view_name, $display_id) = explode(':', $this->options['view_to_insert']);

View File

@ -100,7 +100,7 @@ class Boolean extends FieldPluginBase {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if (!empty($this->options['not'])) { if (!empty($this->options['not'])) {
$value = !$value; $value = !$value;

View File

@ -41,7 +41,7 @@ class Custom extends FieldPluginBase {
$form['#pre_render'][] = array($this, 'preRenderCustomForm'); $form['#pre_render'][] = array($this, 'preRenderCustomForm');
} }
function render($values) { public function render($values) {
// Return the text, so the code never thinks the value is empty. // Return the text, so the code never thinks the value is empty.
return $this->options['alter']['text']; return $this->options['alter']['text'];
} }

View File

@ -129,7 +129,7 @@ class Date extends FieldPluginBase {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
$format = $this->options['date_format']; $format = $this->options['date_format'];
if (in_array($format, array('custom', 'raw time ago', 'time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span'))) { if (in_array($format, array('custom', 'raw time ago', 'time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span'))) {

View File

@ -1097,7 +1097,7 @@ abstract class FieldPluginBase extends HandlerBase {
* @param $values * @param $values
* The values retrieved from the database. * The values retrieved from the database.
*/ */
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->sanitizeValue($value); return $this->sanitizeValue($value);
} }

View File

@ -38,7 +38,7 @@ class FileSize extends FieldPluginBase {
); );
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if ($value) { if ($value) {
switch ($this->options['file_size_display']) { switch ($this->options['file_size_display']) {

View File

@ -66,7 +66,7 @@ class MachineName extends FieldPluginBase {
$this->getValueOptions(); $this->getValueOptions();
} }
function render($values) { public function render($values) {
$value = $values->{$this->field_alias}; $value = $values->{$this->field_alias};
if (!empty($this->options['machine_name']) || !isset($this->value_options[$value])) { if (!empty($this->options['machine_name']) || !isset($this->value_options[$value])) {
$result = check_plain($value); $result = check_plain($value);

View File

@ -40,7 +40,7 @@ class Markup extends FieldPluginBase {
} }
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if (is_array($this->format)) { if (is_array($this->format)) {
$format = $this->getValue($values, 'format'); $format = $this->getValue($values, 'format');

View File

@ -124,7 +124,7 @@ class Numeric extends FieldPluginBase {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if (!empty($this->options['set_precision'])) { if (!empty($this->options['set_precision'])) {
$value = number_format($value, $this->options['precision'], $this->options['decimal'], $this->options['separator']); $value = number_format($value, $this->options['precision'], $this->options['decimal'], $this->options['separator']);

View File

@ -59,7 +59,7 @@ class Serialized extends FieldPluginBase {
} }
} }
function render($values) { public function render($values) {
$value = $values->{$this->field_alias}; $value = $values->{$this->field_alias};
if ($this->options['format'] == 'unserialized') { if ($this->options['format'] == 'unserialized') {

View File

@ -37,7 +37,7 @@ class TimeInterval extends FieldPluginBase {
); );
} }
function render($values) { public function render($values) {
$value = $values->{$this->field_alias}; $value = $values->{$this->field_alias};
return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2); return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2);
} }

View File

@ -38,7 +38,7 @@ class Url extends FieldPluginBase {
parent::buildOptionsForm($form, $form_state); parent::buildOptionsForm($form, $form_state);
} }
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
if (!empty($this->options['display_as_link'])) { if (!empty($this->options['display_as_link'])) {
return l($this->sanitizeValue($value), $value, array('html' => TRUE)); return l($this->sanitizeValue($value), $value, array('html' => TRUE));

View File

@ -19,7 +19,7 @@ use Drupal\Component\Annotation\PluginID;
*/ */
class Xss extends FieldPluginBase { class Xss extends FieldPluginBase {
function render($values) { public function render($values) {
$value = $this->getValue($values); $value = $this->getValue($values);
return $this->sanitizeValue($value, 'xss'); return $this->sanitizeValue($value, 'xss');
} }

View File

@ -80,7 +80,7 @@ class Full extends SqlBase {
/** /**
* Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render(). * Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render().
*/ */
function render($input) { public function render($input) {
$pager_theme = $this->view->buildThemeFunctions('pager'); $pager_theme = $this->view->buildThemeFunctions('pager');
// The 0, 1, 3, 4 indexes are correct. See the template_preprocess_pager() // The 0, 1, 3, 4 indexes are correct. See the template_preprocess_pager()
// documentation. // documentation.

View File

@ -95,7 +95,7 @@ class Mini extends SqlBase {
/** /**
* Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render(). * Overrides \Drupal\views\Plugin\views\pager\PagerPluginBase::render().
*/ */
function render($input) { public function render($input) {
// The 1, 3 indexes are correct, see template_preprocess_pager(). // The 1, 3 indexes are correct, see template_preprocess_pager().
$tags = array( $tags = array(
1 => $this->options['tags']['previous'], 1 => $this->options['tags']['previous'],

View File

@ -226,7 +226,7 @@ abstract class PagerPluginBase extends PluginBase {
* Any extra GET parameters that should be retained, such as exposed * Any extra GET parameters that should be retained, such as exposed
* input. * input.
*/ */
function render($input) { } public function render($input) { }
/** /**
* Determine if there are more records available. * Determine if there are more records available.

View File

@ -164,7 +164,7 @@ class EntityRow extends RowPluginBase {
/** /**
* Overrides Drupal\views\Plugin\views\row\RowPluginBase::render(). * Overrides Drupal\views\Plugin\views\row\RowPluginBase::render().
*/ */
function render($row) { public function render($row) {
$entity_id = $row->{$this->field_alias}; $entity_id = $row->{$this->field_alias};
return $this->build[$entity_id]; return $this->build[$entity_id];
} }

View File

@ -147,7 +147,7 @@ abstract class RowPluginBase extends PluginBase {
* @return string * @return string
* The rendered output of a single row, used by the style plugin. * The rendered output of a single row, used by the style plugin.
*/ */
function render($row) { public function render($row) {
return array( return array(
'#theme' => $this->themeFunctions(), '#theme' => $this->themeFunctions(),
'#view' => $this->view, '#view' => $this->view,

View File

@ -126,7 +126,7 @@ class RssFields extends RowPluginBase {
return $errors; return $errors;
} }
function render($row) { public function render($row) {
static $row_index; static $row_index;
if (!isset($row_index)) { if (!isset($row_index)) {
$row_index = 0; $row_index = 0;

View File

@ -77,7 +77,7 @@ class DefaultSummary extends StylePluginBase {
); );
} }
function render() { public function render() {
$rows = array(); $rows = array();
foreach ($this->view->result as $row) { foreach ($this->view->result as $row) {
// @todo: Include separator as an option. // @todo: Include separator as an option.

View File

@ -131,7 +131,7 @@ abstract class Mapping extends StylePluginBase {
* *
* Provides the mapping definition as an available variable. * Provides the mapping definition as an available variable.
*/ */
function render() { public function render() {
return array( return array(
'#theme' => $this->themeFunctions(), '#theme' => $this->themeFunctions(),
'#view' => $this->view, '#view' => $this->view,

View File

@ -111,7 +111,7 @@ class Rss extends StylePluginBase {
return $description; return $description;
} }
function render() { public function render() {
if (empty($this->view->rowPlugin)) { if (empty($this->view->rowPlugin)) {
debug('Drupal\views\Plugin\views\style\Rss: Missing row plugin'); debug('Drupal\views\Plugin\views\style\Rss: Missing row plugin');
return; return;

View File

@ -425,7 +425,7 @@ abstract class StylePluginBase extends PluginBase {
/** /**
* Render the display in this style. * Render the display in this style.
*/ */
function render() { public function render() {
if ($this->usesRowPlugin() && empty($this->view->rowPlugin)) { if ($this->usesRowPlugin() && empty($this->view->rowPlugin)) {
debug('Drupal\views\Plugin\views\style\StylePluginBase: Missing row plugin'); debug('Drupal\views\Plugin\views\style\StylePluginBase: Missing row plugin');
return; return;

View File

@ -52,7 +52,7 @@ class FieldTest extends FieldPluginBase {
/** /**
* Overrides Drupal\views\Plugin\views\field\FieldPluginBase::render(). * Overrides Drupal\views\Plugin\views\field\FieldPluginBase::render().
*/ */
function render($values) { public function render($values) {
return $this->sanitizeValue($this->getTestValue()); return $this->sanitizeValue($this->getTestValue());
} }