Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2012 at 16:46 UTC
Updated:
2 Feb 2012 at 14:40 UTC
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
Comment #1
dawehnerFilters 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
Comment #2
Niklas Fiekas commentedMhh ... no. I guess I am just using that term incorrectly. "views_handler_filter_date" (which I extend) is not a field handler, right?
Comment #3
dawehnerOn which method() do you need this information?
In general it would be pretty much impossible to know see above.
Comment #4
Niklas Fiekas commentedoptions_validate() and exposed_validate().
I have a workaround in case it doesn't work, but it would be nicer if it did.
Comment #5
Niklas Fiekas commentedThanks, forgot to close this.