October 2017
Intermediate to advanced
566 pages
14h 31m
English
Drawing from our example on implementing hook_entity_view(), there's a neat little technique we can use to empower our site builders further with respect to that disclaimer message. This is by turning it into a pseudo field. By doing this, site builders will be able to choose the bundles it should show on, as well as the position relative to the other fields, all through the UI in the Manage Display section:

So, there are two things we need to do for this. First, we need to implement hook_entity_extra_field_info() and define our pseudo field:
/** * Implements hook_entity_extra_field_info(). */ function module_name_entity_extra_field_info() ...
Read now
Unlock full access