Skip to content

Instantly share code, notes, and snippets.

@jenitehan
Created April 26, 2016 16:56
Show Gist options
  • Save jenitehan/5824884873eed8e29d9eaf6a2c5c0448 to your computer and use it in GitHub Desktop.
Save jenitehan/5824884873eed8e29d9eaf6a2c5c0448 to your computer and use it in GitHub Desktop.
<?php
/**
* Implements template_preprocess_paragraph().
*/
function TEMPLATE_preprocess_paragraph(&$variables) {
$paragraph = $variables['paragraph'];
$bundle = $paragraph->bundle();
if ($bundle == 'mybundle') {
// do stuff
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment