0

I'd like to implement template_preprocess_field in a module for organizational purposes.

How can I do this?

Thanks!

Reference: https://api.drupal.org/api/drupal/core%21includes%21theme.inc/function/template_preprocess_field/8.2.x

0

Hook functions are named like so: MODULENAME_hook.

In your case that's:

function MODULENAME_preprocess_field(&$variables) {

}
0

You can also read this: Preprocessing and modifying attributes in a .theme file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.