Extend Image field formatter Image

by noealflantier   Last Updated December 26, 2017 17:07 PM

I successfully extended the Image formatter of the image field with these two functions found here.

function tryklops_main_field_formatter_settings_summary_alter(&$summary, $context) {}
function my_module_field_formatter_third_party_settings_form($plugin, $field_definition, $view_mode, $form, $form_state) {}

I am just adding a checkbox (Boolean property), and changing the output depending on that Boolean in hook_preprocess_field().

It works fine on the manage display side, where I can access the formatter and see the added checkbox, but when I try to show an image field with that formatter in a view, my added checkbox doesn't appear.

Are third party settings not taken into account on purpose by the Views module, or am I doing something wrong?

Tags : views fields hooks

Related Questions

How can I access the raw value of a view field

Updated August 07, 2017 09:07 AM

database selection(db_Select)

Updated November 22, 2016 08:03 AM