Having a field handler like that:

 class birthdays_field_views_handler_filter extends views_handler_filter_date { 
  ...
} 

The field instance has some settings with effect on the filtering. How can I access the field instance settings (or get the bundle name) of the field being handled?

Comments

dawehner’s picture

Filters are currently per field not per instance which makes it more or less impossible to get any information from the bundle. You know it would be possible to return fields from different bundles.

Maybe you could check for a filter/argument which filters by the key of the bundle, but this wouldn't be to easy.

... oh wait you have a field handler?
Then you have the full entities loaded see views/modules/field/views_handler_field_field.inc

Niklas Fiekas’s picture

Mhh ... no. I guess I am just using that term incorrectly. "views_handler_filter_date" (which I extend) is not a field handler, right?

dawehner’s picture

On which method() do you need this information?

In general it would be pretty much impossible to know see above.

Niklas Fiekas’s picture

options_validate() and exposed_validate().

I have a workaround in case it doesn't work, but it would be nicer if it did.

Niklas Fiekas’s picture

Status: Active » Fixed

Thanks, forgot to close this.

Status: Fixed » Closed (fixed)

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