You are here

function varbase_fpp_entity_view in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 7.3

Implements hook_entity_view().

File

modules/starter_kits/varbase_fpp/varbase_fpp.module, line 80

Code

function varbase_fpp_entity_view($entity, $type, $view_mode, $langcode) {
  if ($type == 'fieldable_panels_pane' && $entity->bundle == 'slideshow') {
    $items = field_get_items('fieldable_panels_pane', $entity, 'field_fpp_slides', $entity->language);
    $id = array();
    foreach ($items as $value) {
      $id[] = $value['value'];
    }
    $args = implode('+', $id);
    $entity->content['varbase_fpp_slideshow']['#markup'] = views_embed_view('varbase_fpp_slideshow', $entity->conf['views_diplay'], $args);
  }
}