Support from Acquia helps fund testing for Drupal Acquia logo

Comments

toddtomlinson’s picture

Assigned: Unassigned » toddtomlinson
toddtomlinson’s picture

Assigned: toddtomlinson » Unassigned
Status: Active » Needs review
FileSize
2.65 KB

Patch applied that renames build_group_form.

toddtomlinson’s picture

Assigned: Unassigned » toddtomlinson
Status: Needs review » Needs work
toddtomlinson’s picture

Assigned: toddtomlinson » Unassigned
Status: Needs work » Needs review
FileSize
1.13 KB

Fixed the patch. Had included previous changes. Only lists build_group_form now.

oenie’s picture

Status: Needs review » Needs work
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.phpundefined
@@ -829,7 +829,7 @@ public function buildExposedForm(&$form, &$form_state) {
+  function buildGroupForm(&$form, &$form_state) {

Add protected access modifier in front of the function to adher to the new OOP standards.

watsonerror’s picture

Assigned: Unassigned » watsonerror

got it

watsonerror’s picture

Status: Needs work » Needs review
FileSize
767 bytes

function is now protected

oenie’s picture

Status: Needs review » Needs work

You have to make sure there is one patch that contains all changes needed.
Your latest patch is only the latest change.
Try again, including all changes from the original patches.

zschmid’s picture

Assigned: watsonerror » Unassigned
Status: Needs work » Needs review
FileSize
1.55 KB

Updated patch

Status: Needs review » Needs work

The last submitted patch, views-buildGroupForm-2002378-9.patch, failed testing.

zschmid’s picture

The issue here is that the buildGroupForm namespace is already used at around line 419 of FilterPluginBase.php .

  public function buildGroupForm($form, &$form_state) {
    $item = &$this->options;
    // flip. If the filter was a group, set back to a standard filter.
    $item['is_grouped'] = empty($item['is_grouped']);

    // If necessary, set new defaults:
    if ($item['is_grouped']) {
      $this->build_group_options();
    }

    $form_state['view']->get('executable')->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item);

    $form_state['view']->addFormToStack($form_state['form_key'], $form_state['display_id'], $form_state['type'], $form_state['id'], TRUE, TRUE);

    $form_state['view']->cacheSet();
    $form_state['rerender'] = TRUE;
    $form_state['rebuild'] = TRUE;
    $form_state['force_build_group_options'] = TRUE;
  }

renaming the build_group_form method to buildGroupForm throws all sorts of errors. any suggestions on what we should rename this to, to avoid the conflict?

shnark’s picture

Status: Needs work » Needs review
FileSize
1.18 KB
1.17 KB

i read the function and picked a more specific name.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks wonderful. There are just these two instances.

webchick’s picture

Title: Rename Views method build_group_form() to buildGroupForm() » Change notice: Rename Views method build_group_form() to buildGroupForm()
Project: Drupal core » Views (for Drupal 7)
Version: 8.x-dev » 8.x-3.x-dev
Component: views.module » Code
Status: Reviewed & tested by the community » Active
Issue tags: +Needs change record

Committed and pushed to 8.x. Thanks!

Moving to Views for the change notice.

xjm’s picture

Title: Change notice: Rename Views method build_group_form() to buildGroupForm() » Rename Views method build_group_form() to buildGroupForm()
Project: Views (for Drupal 7) » Drupal core
Version: 8.x-3.x-dev » 8.x-dev
Component: Code » views.module
Status: Active » Fixed
Issue tags: -Needs change record

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