When I worked on #1439838: Views support I saw that views doesn't pass the instance. The attached patch adds the instance to the handler.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yannickoo’s picture

Status: Active » Needs review
FileSize
1.32 KB
dawehner’s picture

Status: Needs review » Needs work
+++ b/modules/field/views_handler_field_field.incundefined
@@ -450,10 +450,10 @@ class views_handler_field_field extends views_handler_field {
+    $this->instance = ctools_fields_fake_field_instance($this->definition['field_name'], '_dummy', $formatter, $settings);

It would be cool if you could document the $this->instance variable on the actual class.

yannickoo’s picture

Status: Needs work » Needs review
FileSize
1.65 KB

So, just updated the patch, included the documentation and the patch from #1741242: Replace _dummy view mode with _custom. BTW don't forget to attribute authorship ;)

dawehner’s picture

Title: Views handler doesn't pass the field instance » Views handler doesn't store the field instance in the object, so it's hard to reuse
Status: Needs review » Needs work

Based on the recent update you did with the _dummy change this patch does not apply anymore.

This should you to remember to keep patches seperated.

yannickoo’s picture

Status: Needs work » Needs review
FileSize
1.6 KB

And updated the patch again...

yannickoo’s picture

I removed the one blank line and added a blank line to the other variable documentations.

dawehner’s picture

Status: Needs review » Fixed

This looks fine as well, so let's get this in. Committed to 8/7.x-3.x

Status: Fixed » Closed (fixed)

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