diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/field/TitleLink.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/field/TitleLink.php index 27b5aa0..df1ebe7 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/field/TitleLink.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/field/TitleLink.php @@ -29,7 +29,7 @@ class TitleLink extends FieldPluginBase { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['link'] = 'link'; + $this->additionalFields['link'] = 'link'; } /** diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Comment.php index 6ca9540..cde9cd7 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Comment.php @@ -38,9 +38,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (!empty($this->options['link_to_comment'])) { - $this->additional_fields['cid'] = 'cid'; - $this->additional_fields['entity_id'] = 'entity_id'; - $this->additional_fields['entity_type'] = 'entity_type'; + $this->additionalFields['cid'] = 'cid'; + $this->additionalFields['entity_id'] = 'entity_id'; + $this->additionalFields['entity_type'] = 'entity_type'; } } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LastTimestamp.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LastTimestamp.php index 5ba79da..aa3bbb1 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LastTimestamp.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/LastTimestamp.php @@ -28,7 +28,7 @@ class LastTimestamp extends Date { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['comment_count'] = 'comment_count'; + $this->additionalFields['comment_count'] = 'comment_count'; } /** diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeNewComments.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeNewComments.php index 270136e..5f92fdc 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeNewComments.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeNewComments.php @@ -70,9 +70,9 @@ public static function create(ContainerInterface $container, array $configuratio public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['entity_id'] = 'nid'; - $this->additional_fields['type'] = 'type'; - $this->additional_fields['comment_count'] = array('table' => 'comment_entity_statistics', 'field' => 'comment_count'); + $this->additionalFields['entity_id'] = 'nid'; + $this->additionalFields['type'] = 'type'; + $this->additionalFields['comment_count'] = array('table' => 'comment_entity_statistics', 'field' => 'comment_count'); } protected function defineOptions() { @@ -97,7 +97,7 @@ public function buildOptionsForm(&$form, &$form_state) { public function query() { $this->ensureMyTable(); $this->addAdditionalFields(); - $this->field_alias = $this->table . '_' . $this->field; + $this->fieldAlias = $this->table . '_' . $this->field; } public function preRender(&$values) { @@ -110,7 +110,7 @@ public function preRender(&$values) { $ids = array(); foreach ($values as $id => $result) { $nids[] = $result->{$this->aliases['nid']}; - $values[$id]->{$this->field_alias} = 0; + $values[$id]->{$this->fieldAlias} = 0; // Create a reference so we can find this record in the values again. if (empty($ids[$result->{$this->aliases['nid']}])) { $ids[$result->{$this->aliases['nid']}] = array(); @@ -129,7 +129,7 @@ public function preRender(&$values) { )); foreach ($result as $node) { foreach ($ids[$node->id()] as $id) { - $values[$id]->{$this->field_alias} = $node->num_comments; + $values[$id]->{$this->fieldAlias} = $node->num_comments; } } } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Username.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Username.php index 9d63403..decb9e0 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Username.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Username.php @@ -30,8 +30,8 @@ class Username extends FieldPluginBase { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['uid'] = 'uid'; - $this->additional_fields['homepage'] = 'homepage'; + $this->additionalFields['uid'] = 'uid'; + $this->additionalFields['homepage'] = 'homepage'; } protected function defineOptions() { 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 9bbb6ca..fd7277a 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 @@ -215,7 +215,7 @@ public function query($use_groupby = FALSE) { $this->get_base_table(); $entity_type = $this->definition['entity_tables'][$this->base_table]; - $fields = $this->additional_fields; + $fields = $this->additionalFields; // No need to add the entity type. $entity_type_key = array_search('entity_type', $fields); if ($entity_type_key !== FALSE) { diff --git a/core/modules/file/lib/Drupal/file/Plugin/views/field/File.php b/core/modules/file/lib/Drupal/file/Plugin/views/field/File.php index 3f28bd8..dfda5a1 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/views/field/File.php +++ b/core/modules/file/lib/Drupal/file/Plugin/views/field/File.php @@ -29,7 +29,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (!empty($options['link_to_file'])) { - $this->additional_fields['uri'] = 'uri'; + $this->additionalFields['uri'] = 'uri'; } } diff --git a/core/modules/file/lib/Drupal/file/Plugin/views/field/FileMime.php b/core/modules/file/lib/Drupal/file/Plugin/views/field/FileMime.php index 8c6ab7e..8c56d39 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/views/field/FileMime.php +++ b/core/modules/file/lib/Drupal/file/Plugin/views/field/FileMime.php @@ -38,7 +38,7 @@ public function buildOptionsForm(&$form, &$form_state) { * {@inheritdoc} */ public function render(ResultRow $values) { - $data = $values->{$this->field_alias}; + $data = $values->{$this->fieldAlias}; if (!empty($this->options['filemime_image']) && $data !== NULL && $data !== '') { $file_icon = array( '#theme' => 'file_icon', diff --git a/core/modules/file/lib/Drupal/file/Plugin/views/field/Uri.php b/core/modules/file/lib/Drupal/file/Plugin/views/field/Uri.php index 1191265..d334779 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/views/field/Uri.php +++ b/core/modules/file/lib/Drupal/file/Plugin/views/field/Uri.php @@ -37,7 +37,7 @@ public function buildOptionsForm(&$form, &$form_state) { * {@inheritdoc} */ public function render(ResultRow $values) { - $data = $values->{$this->field_alias}; + $data = $values->{$this->fieldAlias}; if (!empty($this->options['file_download_path']) && $data !== NULL && $data !== '') { $data = file_create_url($data); } diff --git a/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php b/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php index 2efd1cb..75b8952 100644 --- a/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php +++ b/core/modules/history/lib/Drupal/history/Plugin/views/field/HistoryUserTimestamp.php @@ -39,10 +39,10 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (\Drupal::currentUser()->isAuthenticated()) { - $this->additional_fields['created'] = array('table' => 'node_field_data', 'field' => 'created'); - $this->additional_fields['changed'] = array('table' => 'node_field_data', 'field' => 'changed'); + $this->additionalFields['created'] = array('table' => 'node_field_data', 'field' => 'created'); + $this->additionalFields['changed'] = array('table' => 'node_field_data', 'field' => 'changed'); if (module_exists('comment') && !empty($this->options['comments'])) { - $this->additional_fields['last_comment'] = array('table' => 'comment_entity_statistics', 'field' => 'last_comment_timestamp'); + $this->additionalFields['last_comment'] = array('table' => 'comment_entity_statistics', 'field' => 'last_comment_timestamp'); } } } diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/Node.php index b2de15a..c2ef072 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/Node.php @@ -32,7 +32,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o // Don't add the additional fields to groupby if (!empty($this->options['link_to_node'])) { - $this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid'); + $this->additionalFields['nid'] = array('table' => 'node', 'field' => 'nid'); } } @@ -68,7 +68,7 @@ public function buildOptionsForm(&$form, &$form_state) { * Returns a string for the link text. */ protected function renderLink($data, ResultRow $values) { - if (!empty($this->options['link_to_node']) && !empty($this->additional_fields['nid'])) { + if (!empty($this->options['link_to_node']) && !empty($this->additionalFields['nid'])) { if ($data !== NULL && $data !== '') { $this->options['alter']['make_link'] = TRUE; $this->options['alter']['path'] = "node/" . $this->getValue($values, 'nid'); diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/Path.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/Path.php index 4c0c6c8..d72399e 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/Path.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/Path.php @@ -28,7 +28,7 @@ class Path extends FieldPluginBase { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['nid'] = 'nid'; + $this->additionalFields['nid'] = 'nid'; } protected function defineOptions() { diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/Revision.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/Revision.php index f99f6b7..6ad8e44 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/Revision.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/Revision.php @@ -29,8 +29,8 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (!empty($this->options['link_to_node_revision'])) { - $this->additional_fields['vid'] = 'vid'; - $this->additional_fields['nid'] = 'nid'; + $this->additionalFields['vid'] = 'vid'; + $this->additionalFields['nid'] = 'nid'; } } protected function defineOptions() { diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php index 6a733f3..c7f4dcd 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php @@ -28,7 +28,7 @@ class RevisionLink extends Link { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['node_vid'] = array('table' => 'node_revision', 'field' => 'vid'); + $this->additionalFields['node_vid'] = array('table' => 'node_revision', 'field' => 'vid'); } public function access() { diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php index 73291ca..4dd2715 100644 --- a/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php +++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/row/DataFieldRow.php @@ -142,7 +142,7 @@ public function render($row) { foreach ($this->view->field as $id => $field) { // If this is not unknown and the raw output option has been set, just get // the raw value. - if (($field->field_alias != 'unknown') && !empty($this->rawOutputOptions[$id])) { + if (($field->fieldAlias != 'unknown') && !empty($this->rawOutputOptions[$id])) { $value = $field->sanitizeValue($field->getValue($row), 'xss_admin'); } // Otherwise, pass this through the field render() method. diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/field/Score.php b/core/modules/search/lib/Drupal/search/Plugin/views/field/Score.php index e6646d1..4d035d9 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/views/field/Score.php +++ b/core/modules/search/lib/Drupal/search/Plugin/views/field/Score.php @@ -64,7 +64,7 @@ public function query() { // one or obviously this won't work. foreach ($this->view->filter as $handler) { if (isset($handler->search_score) && $handler->relationship == $this->relationship) { - $this->field_alias = $handler->search_score; + $this->fieldAlias = $handler->search_score; $this->tableAlias = $handler->tableAlias; return; } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php index 54b5ad5..f3bd6e8 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/LinkEdit.php @@ -28,8 +28,8 @@ class LinkEdit extends FieldPluginBase { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['tid'] = 'tid'; - $this->additional_fields['vid'] = 'vid'; + $this->additionalFields['tid'] = 'tid'; + $this->additionalFields['vid'] = 'vid'; } protected function defineOptions() { diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php index be01032..1200925 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php @@ -35,8 +35,8 @@ class Taxonomy extends FieldPluginBase { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['vid'] = 'vid'; - $this->additional_fields['tid'] = 'tid'; + $this->additionalFields['vid'] = 'vid'; + $this->additionalFields['tid'] = 'tid'; } protected function defineOptions() { diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/TaxonomyIndexTid.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/TaxonomyIndexTid.php index 8cbb9fb..51f5502 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/TaxonomyIndexTid.php @@ -29,10 +29,10 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o // @todo: Wouldn't it be possible to use $this->base_table and no if here? if ($view->storage->get('base_table') == 'node_field_revision') { - $this->additional_fields['nid'] = array('table' => 'node_field_revision', 'field' => 'nid'); + $this->additionalFields['nid'] = array('table' => 'node_field_revision', 'field' => 'nid'); } else { - $this->additional_fields['nid'] = array('table' => 'node', 'field' => 'nid'); + $this->additionalFields['nid'] = array('table' => 'node', 'field' => 'nid'); } } @@ -93,7 +93,7 @@ public function query() { public function preRender(&$values) { $vocabularies = entity_load_multiple('taxonomy_vocabulary'); - $this->field_alias = $this->aliases['nid']; + $this->fieldAlias = $this->aliases['nid']; $nids = array(); foreach ($values as $result) { if (!empty($result->{$this->aliases['nid']})) { diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php index 88102b8..f25a6c5 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php @@ -36,7 +36,7 @@ public function usesGroupBy() { public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['uid'] = 'uid'; + $this->additionalFields['uid'] = 'uid'; } protected function defineOptions() { diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Name.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Name.php index fb374ba..69be5a3 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Name.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Name.php @@ -31,7 +31,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (!empty($this->options['overwrite_anonymous']) || !empty($this->options['format_username'])) { - $this->additional_fields['uid'] = 'uid'; + $this->additionalFields['uid'] = 'uid'; } } diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php index 2c0529b..3a46435 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php @@ -72,12 +72,12 @@ public static function create(ContainerInterface $container, array $configuratio public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid'); + $this->additionalFields['uid'] = array('table' => 'users', 'field' => 'uid'); } public function query() { $this->addAdditionalFields(); - $this->field_alias = $this->aliases['uid']; + $this->fieldAlias = $this->aliases['uid']; } public function preRender(&$values) { diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Roles.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Roles.php index 22c2819..371b4e3 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Roles.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Roles.php @@ -61,12 +61,12 @@ public static function create(ContainerInterface $container, array $configuratio public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid'); + $this->additionalFields['uid'] = array('table' => 'users', 'field' => 'uid'); } public function query() { $this->addAdditionalFields(); - $this->field_alias = $this->aliases['uid']; + $this->fieldAlias = $this->aliases['uid']; } public function preRender(&$values) { diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php index 159b4aa..56388d6 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php @@ -29,7 +29,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (!empty($this->options['link_to_user'])) { - $this->additional_fields['uid'] = 'uid'; + $this->additionalFields['uid'] = 'uid'; } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php index bc37f33..f585a17 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php @@ -71,7 +71,7 @@ public static function create(ContainerInterface $container, array $configuratio */ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields[$this->definition['entity type field']] = $this->definition['entity type field']; + $this->additionalFields[$this->definition['entity type field']] = $this->definition['entity type field']; } /** 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 db4a5d8..6038587 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 @@ -51,22 +51,34 @@ */ const RENDER_TEXT_PHASE_EMPTY = 2; - var $field_alias = 'unknown'; - var $aliases = array(); + /** + * The alias that results from adding a field to a query. + * + * @var string + */ + protected $fieldAlias = 'unknown'; + + /** + * The generated aliases. + * + * @var array + */ + protected $aliases = array(); /** * The field value prior to any rewriting. * * @var mixed */ - public $original_value = NULL; + public $originalValue = NULL; /** * @var array - * Stores additional fields which get's added to the query. + * Stores additional fields which get added to the query. + * * The generated aliases are stored in $aliases. */ - var $additional_fields = array(); + var $additionalFields = array(); /** * Overrides Drupal\views\Plugin\views\HandlerBase::init(). @@ -74,9 +86,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $this->additional_fields = array(); + $this->additionalFields = array(); if (!empty($this->definition['additional fields'])) { - $this->additional_fields = $this->definition['additional fields']; + $this->additionalFields = $this->definition['additional fields']; } if (!isset($this->options['exclude'])) { @@ -101,7 +113,7 @@ public function query() { $this->ensureMyTable(); // Add the field. $params = $this->options['group_type'] != 'group' ? array('function' => $this->options['group_type']) : array(); - $this->field_alias = $this->query->addField($this->tableAlias, $this->realField, NULL, $params); + $this->fieldAlias = $this->query->addField($this->tableAlias, $this->realField, NULL, $params); $this->addAdditionalFields(); } @@ -119,10 +131,10 @@ public function query() { protected function addAdditionalFields($fields = NULL) { if (!isset($fields)) { // notice check - if (empty($this->additional_fields)) { + if (empty($this->additionalFields)) { return; } - $fields = $this->additional_fields; + $fields = $this->additionalFields; } $group_params = array(); @@ -167,11 +179,11 @@ protected function addAdditionalFields($fields = NULL) { * Called to determine what to tell the clicksorter. */ public function clickSort($order) { - if (isset($this->field_alias)) { + if (isset($this->fieldAlias)) { // Since fields should always have themselves already added, just // add a sort on the field. $params = $this->options['group_type'] != 'group' ? array('function' => $this->options['group_type']) : array(); - $this->query->addOrderBy(NULL, NULL, $order, $this->field_alias, $params); + $this->query->addOrderBy(NULL, NULL, $order, $this->fieldAlias, $params); } } @@ -390,7 +402,7 @@ public function getEntity(ResultRow $values) { * Optional name of the field where the value is stored. */ public function getValue(ResultRow $values, $field = NULL) { - $alias = isset($field) ? $this->aliases[$field] : $this->field_alias; + $alias = isset($field) ? $this->aliases[$field] : $this->fieldAlias; if (isset($values->{$alias})) { return $values->{$alias}; } @@ -1119,7 +1131,7 @@ public function advancedRender(ResultRow $values) { $raw_items = $this->getItems($values); // If there are no items, set the original value to NULL. if (empty($raw_items)) { - $this->original_value = NULL; + $this->originalValue = NULL; } } else { @@ -1128,7 +1140,7 @@ public function advancedRender(ResultRow $values) { $value = drupal_render($value); } $this->last_render = $value; - $this->original_value = $value; + $this->originalValue = $value; } if ($this->allowAdvancedRender()) { @@ -1141,7 +1153,7 @@ public function advancedRender(ResultRow $values) { $value = drupal_render($value); } $this->last_render = $value; - $this->original_value = $this->last_render; + $this->originalValue = $this->last_render; $alter = $item + $this->options['alter']; $alter['phase'] = static::RENDER_TEXT_PHASE_SINGLE_ITEM; @@ -1222,7 +1234,7 @@ public function renderText($alter) { } // Check if there should be no further rewrite for empty values. - $no_rewrite_for_empty = $this->options['hide_alter_empty'] && $this->isValueEmpty($this->original_value, $this->options['empty_zero']); + $no_rewrite_for_empty = $this->options['hide_alter_empty'] && $this->isValueEmpty($this->originalValue, $this->options['empty_zero']); // Check whether the value is empty and return nothing, so the field isn't rendered. // First check whether the field should be hidden if the value(hide_alter_empty = TRUE) /the rewrite is empty (hide_alter_empty = FALSE). diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/MachineName.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/MachineName.php index 7acd40b..9e6896c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/MachineName.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/MachineName.php @@ -71,7 +71,7 @@ public function preRender(&$values) { * {@inheritdoc} */ public function render(ResultRow $values) { - $value = $values->{$this->field_alias}; + $value = $values->{$this->fieldAlias}; if (!empty($this->options['machine_name']) || !isset($this->valueOptions[$value])) { $result = check_plain($value); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Markup.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Markup.php index 8145321..fc0714f 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Markup.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Markup.php @@ -35,9 +35,9 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o $this->format = $this->definition['format']; - $this->additional_fields = array(); + $this->additionalFields = array(); if (is_array($this->format)) { - $this->additional_fields['format'] = $this->format; + $this->additionalFields['format'] = $this->format; } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Serialized.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Serialized.php index db67c57..fb10166 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Serialized.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Serialized.php @@ -64,7 +64,7 @@ public function validateOptionsForm(&$form, &$form_state) { * {@inheritdoc} */ public function render(ResultRow $values) { - $value = $values->{$this->field_alias}; + $value = $values->{$this->fieldAlias}; if ($this->options['format'] == 'unserialized') { return check_plain(print_r(unserialize($value), TRUE)); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php index bbd1a96..5ab6947 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/TimeInterval.php @@ -42,7 +42,7 @@ public function buildOptionsForm(&$form, &$form_state) { * {@inheritdoc} */ public function render(ResultRow $values) { - $value = $values->{$this->field_alias}; + $value = $values->{$this->fieldAlias}; return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php index 69d7beb..a117ba9 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/RowPluginBase.php @@ -153,7 +153,7 @@ public function render($row) { '#view' => $this->view, '#options' => $this->options, '#row' => $row, - '#field_alias' => isset($this->field_alias) ? $this->field_alias : '', + '#field_alias' => isset($this->fieldAlias) ? $this->fieldAlias : '', ); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php index a9571d1..9d64486 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/RssFields.php @@ -179,7 +179,7 @@ public function render($row) { 'view' => $this->view, 'options' => $this->options, 'row' => $item, - 'field_alias' => isset($this->field_alias) ? $this->field_alias : '', + 'field_alias' => isset($this->fieldAlias) ? $this->fieldAlias : '', )); }