You are here

function classy_paragraphs_preprocess_entity in Classy paragraphs 7

Implements template_preprocess_entity()

1 call to classy_paragraphs_preprocess_entity()
classy_paragraphs_preprocess_edgy_paragraphs_item in ./classy_paragraphs.module
Implements template_preprocess_edgy_paragraphs_item().

File

./classy_paragraphs.module, line 36
Main module file for Classy Paragraphs.

Code

function classy_paragraphs_preprocess_entity(&$variables) {
  if ($variables['entity_type'] == CLASSY_PARAGRAPHS_ENTITY_TYPE) {
    $classes = classy_paragraphs_get_classes($variables['paragraphs_item']);
    foreach ($classes as $class) {
      $variables['classes_array'][] = drupal_html_class($class);
    }
  }
}