How can I display a list of preprocess block variables so I can conditionally include a library? Using the 'plugin_id' doesn't seem to work and when I echo all of the variables all I see is a blank page. Is there a Drupal page that will show me what all the variables are for blocks?
My custom block module is called, 'leaflet_block'.
function leaflet_block_preprocess_block(&$variables) {
echo "<pre>"; print_r($variables); echo "</pre>"; // shows a blank page
if ($variables['plugin_id'] == 'leaflet_block') {
$variables['#attached']['library'][] = 'leaflet_block/leaflet_block';
}
}