Issue #2002486 by crowdcg, oenie, shixish, dawehner : Rename Views method even_empty() to evenEmpty()

Part of meta-issue #1856630: [Change notice] [META] Rename Views methods to core standards

Files: 
CommentFileSizeAuthor
#16 core-rename_even_empty_TO_evenEmpty-2002486-16.patch3.6 KBcrowdcg
PASSED: [[SimpleTest]]: [MySQL] 56,178 pass(es). View
#10 core-rename_even_empty_TO_evenEmpty-2002486-10.patch3.55 KBcrowdcg
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch core-rename_even_empty_TO_evenEmpty-2002486-10.patch. Unable to apply patch. See the log in the details link for more information. View
#8 core-rename_even_empty_TO_evenEmpty-2002486-8.patch3.65 KBcrowdcg
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch core-rename_even_empty_TO_evenEmpty-2002486-8.patch. Unable to apply patch. See the log in the details link for more information. View
#4 2002486-added-access-modifier-4.diff3.65 KBshixish
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2002486-added-access-modifier-4_0.diff. Unable to apply patch. See the log in the details link for more information. View
#4 interdiff.txt1.83 KBshixish
#2 VDC-Rename_even_empty-2002486-2.patch3.63 KBcrowdcg
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git]. View

Comments

crowdcg’s picture

Assigned: Unassigned » crowdcg

Working on this as part of the Portland2013 getting involved with core sprint.

crowdcg’s picture

Status: Active » Needs review
FileSize
3.63 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git]. View

Replaced 7 instances of even_empty with evenEmpty.

oenie’s picture

Status: Needs review » Needs work
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/style/EntityReference.phpundefined
@@ -102,9 +102,9 @@ public function render() {
+  function evenEmpty() {

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.phpundefined
@@ -212,7 +212,7 @@ function tokenize_value($value, $row_index) {
+  function evenEmpty() {

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.phpundefined
@@ -387,8 +387,8 @@ public function buildOptionsForm(&$form, &$form_state) {
+  function evenEmpty() {

Add public access modifier in front of the functions to adher to the new OOP standards.

shixish’s picture

FileSize
1.83 KB
3.65 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2002486-added-access-modifier-4_0.diff. Unable to apply patch. See the log in the details link for more information. View

Added public to the function definitions.

shixish’s picture

Status: Needs work » Needs review
oenie’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine by me.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2002486-added-access-modifier-4.diff, failed testing.

crowdcg’s picture

Status: Needs work » Needs review
FileSize
3.65 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch core-rename_even_empty_TO_evenEmpty-2002486-8.patch. Unable to apply patch. See the log in the details link for more information. View

Submitting updated patch for retesting.

dawehner’s picture

Thanks for all your help!

+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/style/EntityReference.phpundefined
@@ -102,9 +102,9 @@ public function render() {
+   * Overrides \Drupal\views\Plugin\views\style\StylePluginBase\StylePluginBase::evenEmpty().

Let's do a @inheritdoc, please

crowdcg’s picture

FileSize
3.55 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch core-rename_even_empty_TO_evenEmpty-2002486-10.patch. Unable to apply patch. See the log in the details link for more information. View

Sorry about that, updated with {@inheritdoc}.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Another issue, great!

Status: Reviewed & tested by the community » Needs work
Issue tags: -Novice, -VDC

The last submitted patch, core-rename_even_empty_TO_evenEmpty-2002486-10.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
Issue tags: +Novice, +VDC

The last submitted patch, core-rename_even_empty_TO_evenEmpty-2002486-10.patch, failed testing.

joelpittet’s picture

+++ b/core/modules/views/views.theme.inc
@@ -52,6 +52,7 @@ function _views_theme_functions($hook, ViewExecutable $view, $display = NULL) {
   global $base_path;
 
+  $vars['rows'] = (!empty($view->result) || $view->style_plugin->evenEmpty()) ? $view->style_plugin->render($view->result) : '';
   $view = $vars['view'];
 

Looks like the new line was meant to replace the line 3 rows down from that one.

crowdcg’s picture

Status: Needs work » Needs review
FileSize
3.6 KB
PASSED: [[SimpleTest]]: [MySQL] 56,178 pass(es). View

Thanks, not sure what happened there. This one should pass.

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Novice

Already RTBC'd by @dawehner in #11 and it's green now. So back to it:) Thank you @crowdcg

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c4e1535 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary. Added commit line.