Skip to content
Snippets Groups Projects
Commit 31efff27 authored by Alex Pott's avatar Alex Pott
Browse files

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

parent 0a7db6bd
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Showing
with 20 additions and 20 deletions
......@@ -57,7 +57,7 @@ public function buildOptionsForm(&$form, &$form_state) {
/**
* {@inheritdoc}
*/
function render($values) {
public function render($values) {
$value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values);
}
......
......@@ -71,7 +71,7 @@ public function buildOptionsForm(&$form, &$form_state) {
/**
* {@inheritdoc}
*/
function render($row) {
public function render($row) {
$entity = $row->_entity;
$item = new \stdClass();
......
......@@ -79,7 +79,7 @@ function render_link($data, $values) {
return $data;
}
function render($values) {
public function render($values) {
$value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values);
}
......
......@@ -22,7 +22,7 @@ class Depth extends FieldPluginBase {
/**
* Work out the depth of this comment
*/
function render($values) {
public function render($values) {
$comment_thread = $this->getValue($values);
return count(explode('.', $comment_thread)) - 1;
}
......
......@@ -30,7 +30,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
$this->additional_fields['comment_count'] = 'comment_count';
}
function render($values) {
public function render($values) {
$comment_count = $this->getValue($values, 'comment_count');
if (empty($this->options['empty_zero']) || $comment_count) {
return parent::render($values);
......
......@@ -42,7 +42,7 @@ public function buildOptionsForm(&$form, &$form_state) {
public function query() {}
function render($values) {
public function render($values) {
$comment = $this->getEntity($values);
return $this->render_link($comment, $values);
}
......
......@@ -56,7 +56,7 @@ protected function defineOptions() {
return $options;
}
function render($values) {
public function render($values) {
if (!empty($this->options['link_to_user'])) {
$account = entity_create('user', array());
$account->name = $this->getValue($values);
......
......@@ -19,7 +19,7 @@
*/
class NodeComment extends FieldPluginBase {
function render($values) {
public function render($values) {
$value = $this->getValue($values);
switch ($value) {
case COMMENT_NODE_HIDDEN:
......
......@@ -38,7 +38,7 @@ public function buildOptionsForm(&$form, &$form_state) {
public function query() {}
function render($values) {
public function render($values) {
$node = $this->getEntity($values);
comment_node_view($node, $this->options['teaser'] ? 'teaser' : 'full');
......
......@@ -142,7 +142,7 @@ function render_link($data, $values) {
return $data;
}
function render($values) {
public function render($values) {
$value = $this->getValue($values);
if (!empty($value)) {
return $this->render_link(parent::render($values), $values);
......
......@@ -65,7 +65,7 @@ function render_link($data, $values) {
}
}
function render($values) {
public function render($values) {
$value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values);
}
......
......@@ -40,7 +40,7 @@ public function buildOptionsForm(&$form, &$form_state) {
/**
* {@inheritdoc}
*/
function render($row) {
public function render($row) {
$entity_id = $row->{$this->field_alias};
$build = $this->build[$entity_id];
if (!$this->options['links']) {
......
......@@ -87,7 +87,7 @@ function options_form_summary_options() {
return $options;
}
function render($row) {
public function render($row) {
global $base_url;
$cid = $row->{$this->field_alias};
......
......@@ -44,7 +44,7 @@ public function buildOptionsForm(&$form, &$form_state) {
/**
* Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render().
*/
function render($values) {
public function render($values) {
return $this->render_link($this->getEntity($values), $values);
}
......
......@@ -68,7 +68,7 @@ public function preRender(&$values) {
* @see contextual_preprocess()
* @see contextual_contextual_links_view_alter()
*/
function render($values) {
public function render($values) {
$links = array();
foreach ($this->options['fields'] as $field) {
$rendered_field = $this->view->style_plugin->getField($this->view->row_index, $field);
......
......@@ -41,7 +41,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
function render($values) {
public function render($values) {
$value = $this->getValue($values);
if (!$this->options['extension_detect_tar']) {
if (preg_match('/\.([^\.]+)$/', $value, $match)) {
......
......@@ -65,7 +65,7 @@ function render_link($data, $values) {
return $data;
}
function render($values) {
public function render($values) {
$value = $this->getValue($values);
return $this->render_link($this->sanitizeValue($value), $values);
}
......
......@@ -33,7 +33,7 @@ public function buildOptionsForm(&$form, &$form_state) {
parent::buildOptionsForm($form, $form_state);
}
function render($values) {
public function render($values) {
$data = $values->{$this->field_alias};
if (!empty($this->options['filemime_image']) && $data !== NULL && $data !== '') {
$fake_file = (object) array('filemime' => $data);
......
......@@ -19,7 +19,7 @@
*/
class Status extends FieldPluginBase {
function render($values) {
public function render($values) {
$value = $this->getValue($values);
return _views_file_status($value);
}
......
......@@ -32,7 +32,7 @@ public function buildOptionsForm(&$form, &$form_state) {
parent::buildOptionsForm($form, $form_state);
}
function render($values) {
public function render($values) {
$data = $values->{$this->field_alias};
if (!empty($this->options['file_download_path']) && $data !== NULL && $data !== '') {
$data = file_create_url($data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment