How to create a Tooltip in PHP

This page is an example of how to use the Tooltip module in Drupal.

To add a tooltip programmatically is basically the same as to add a tooltip in Twig directly but using of Drupal's Render API in PHP.

Cache contexts

Cache contexts = (request) context dependencies

Cache contexts are analogous to HTTP's Vary header.

Subscribe with RSS Subscribe to RSS - Render API