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 97ae30e..a03454c 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 @@ -57,7 +57,7 @@ public function query() { $this->field_alias = $this->table . '_' . $this->field; } - function pre_render(&$values) { + public function preRender(&$values) { global $user; if (!$user->uid || empty($values)) { return; diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php index 2e18fa9..a363bab 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php @@ -54,7 +54,7 @@ public function buildOptionsForm(&$form, &$form_state) { ); } - function pre_render($result) { + public function preRender($result) { $cids = array(); $nids = array(); diff --git a/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php index 8a3b4bb..381442c 100644 --- a/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php +++ b/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php @@ -51,7 +51,7 @@ public function buildOptionsForm(&$form, &$form_state) { ); } - function pre_render(&$values) { + function preRender(&$values) { // Add a row plugin css class for the contextual link. $class = 'contextual-region'; if (!empty($this->view->style_plugin->options['row_class'])) { diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/row/EntityReference.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/row/EntityReference.php index 3091519..0696896 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/row/EntityReference.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/row/EntityReference.php @@ -47,15 +47,15 @@ public function buildOptionsForm(&$form, &$form_state) { } /** - * Overrides \Drupal\views\Plugin\views\row\Fields::pre_render(). + * {@inheritdoc} */ - public function pre_render($row) { + public function preRender($row) { // Force all fields to be inline by default. if (empty($this->options['inline'])) { $fields = $this->view->getItems('field', $this->displayHandler->display['id']); $this->options['inline'] = drupal_map_assoc(array_keys($fields)); } - return parent::pre_render($row); + return parent::preRender($row); } } diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php index fbdbbf7..49cc52a 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/row/Rss.php @@ -32,7 +32,7 @@ class Rss extends RowPluginBase { var $base_field = 'nid'; - // Stores the nodes loaded with pre_render. + // Stores the nodes loaded with preRender. var $nodes = array(); protected function defineOptions() { @@ -79,7 +79,7 @@ public function summaryTitle() { return check_plain($options[$this->options['item_length']]); } - function pre_render($values) { + public function preRender($values) { $nids = array(); foreach ($values as $row) { $nids[] = $row->{$this->field_alias}; diff --git a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php index e61c399..2a31459 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php +++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php @@ -57,10 +57,10 @@ public function render($values) { } /** - * Overrides \Drupal\views\Plugin\views\Plugin\field\FieldPluginBase::pre_render(). + * {@inheritdoc} */ - public function pre_render(&$values) { - parent::pre_render($values); + public function preRender(&$values) { + parent::preRender($values); // If the view is using a table style, provide a placeholder for a // "select all" checkbox. 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 45f8d69..8cbb9fb 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 @@ -91,7 +91,7 @@ public function query() { $this->addAdditionalFields(); } - function pre_render(&$values) { + public function preRender(&$values) { $vocabularies = entity_load_multiple('taxonomy_vocabulary'); $this->field_alias = $this->aliases['nid']; $nids = array(); 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 70f01b4..784f293 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 @@ -35,7 +35,7 @@ public function query() { $this->field_alias = $this->aliases['uid']; } - function pre_render(&$values) { + public function preRender(&$values) { $uids = array(); $this->items = array(); 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 140e2bb..81d58a6 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 @@ -35,7 +35,7 @@ public function query() { $this->field_alias = $this->aliases['uid']; } - function pre_render(&$values) { + public function preRender(&$values) { $uids = array(); $this->items = array(); diff --git a/core/modules/user/lib/Drupal/user/Tests/Views/HandlerFieldRoleTest.php b/core/modules/user/lib/Drupal/user/Tests/Views/HandlerFieldRoleTest.php index 476b5cd..969d36c 100644 --- a/core/modules/user/lib/Drupal/user/Tests/Views/HandlerFieldRoleTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/Views/HandlerFieldRoleTest.php @@ -50,7 +50,7 @@ public function testRole() { $this->executeView($view); $view->row_index = 0; // The role field is populated during pre_render. - $view->field['rid']->pre_render($view->result); + $view->field['rid']->preRender($view->result); $render = $view->field['rid']->advancedRender($view->result[0]); $this->assertEqual($rolename_b . $rolename_a, $render, 'View test_views_handler_field_role renders role assigned to user in the correct order.'); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php index 7ee0197..d91e157 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php @@ -45,7 +45,7 @@ public function buildOptionsForm(&$form, &$form_state) { } /** - * Overrides Drupal\views\Plugin\views\AreaPluginBase::preRender(). + * {@inheritdoc} */ public function preRender(array $results) { parent::preRender($results); diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php index 5cea25e..491f0b1 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php @@ -174,7 +174,7 @@ public function query() { } } - function pre_render($values) { } + public function preRender($values) { } function post_render(&$output) { } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php b/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php index 2376f56..38eebee 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php @@ -71,7 +71,7 @@ protected function exposedFilterApplied() { return $cache; } - function pre_render($values) { + public function preRender($values) { if (!$this->exposedFilterApplied()) { $options = array( 'id' => 'area', diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Custom.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Custom.php index c95913d..7b2d25c 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Custom.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Custom.php @@ -47,21 +47,21 @@ function render($values) { } /** - * Prerender function to move the textarea to the top of a form. + * PreRender function to move the textarea to the top of a form. * - * @param array $form + * @param array $values * The form build array. * * @return array * The modified form build array. */ - public function preRender($form) { - $form['text'] = $form['alter']['text']; - $form['help'] = $form['alter']['help']; - unset($form['alter']['text']); - unset($form['alter']['help']); - - return $form; + public function preRender(&$values) { + if (isset($values['alter'])) { + $values['text'] = $values['alter']['text']; + $values['help'] = $values['alter']['help']; + unset($values['alter']['text']); + unset($values['alter']['help']); + } } } 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 7f375ba..592ba79 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 @@ -1090,7 +1090,7 @@ public function adminSummary() { * @param $values * An array of all objects returned from the query. */ - function pre_render(&$values) { } + public function preRender(&$values) { } /** * Render the field. 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 86d8d02..6632da4 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 @@ -62,7 +62,7 @@ public function buildOptionsForm(&$form, &$form_state) { ); } - function pre_render(&$values) { + public function preRender(&$values) { $this->getValueOptions(); } 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 accd78e..01ee041 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 @@ -12,7 +12,7 @@ /** * Field handler to provide a list of items. * - * The items are expected to be loaded by a child object during pre_render, + * The items are expected to be loaded by a child object during preRender, * and 'my field' is expected to be the pointer to the items in the list. * * Items to render should be in a list in $this->items diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php index 316eb88..9994cf5 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php @@ -215,7 +215,7 @@ public function postExecute(&$result) { } /** * Perform any needed actions just before rendering. */ - function pre_render(&$result) { } + public function preRender(&$result) { } /** * Render the pager. diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php b/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php index ef28d0d..10ae792 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php @@ -142,10 +142,10 @@ public function summaryTitle() { } /** - * Overrides Drupal\views\Plugin\views\row\RowPluginBase::pre_render(). + * {@inheritdoc} */ - public function pre_render($result) { - parent::pre_render($result); + public function preRender($result) { + parent::preRender($result); if ($result) { // Get all entities which will be used to render in rows. 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 81b559f..44df69f 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 @@ -135,7 +135,7 @@ public function query() { * @param $result * The full array of results from the query. */ - function pre_render($result) { } + public function preRender($result) { } /** * Render a row object. This usually passes through to a theme template diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php index 8e5c23d..ca53aa0 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php @@ -399,9 +399,9 @@ function build_sort_post() { } * @param $result * The full array of results from the query. */ - function pre_render($result) { + public function preRender($result) { if (!empty($this->view->rowPlugin)) { - $this->view->rowPlugin->pre_render($result); + $this->view->rowPlugin->preRender($result); } } diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 26bfe5d..33dc244 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1227,7 +1227,7 @@ public function render($display_id = NULL) { $config = config('views.settings'); $exposed_form = $this->display_handler->getPlugin('exposed_form'); - $exposed_form->pre_render($this->result); + $exposed_form->preRender($this->result); $module_handler = \Drupal::moduleHandler(); @@ -1246,9 +1246,9 @@ public function render($display_id = NULL) { $cache->cacheStart(); } - // Run pre_render for the pager as it might change the result. + // Run preRender for the pager as it might change the result. if (!empty($this->pager)) { - $this->pager->pre_render($this->result); + $this->pager->preRender($this->result); } // Initialize the style plugin. @@ -1264,12 +1264,12 @@ public function render($display_id = NULL) { if ($this->style_plugin->usesFields()) { foreach ($this->field as $id => $handler) { if (!empty($this->field[$id])) { - $this->field[$id]->pre_render($this->result); + $this->field[$id]->preRender($this->result); } } } - $this->style_plugin->pre_render($this->result); + $this->style_plugin->preRender($this->result); // Let each area handler have access to the result set. $areas = array('header', 'footer');