You are here

function panopoly_widgets_fieldable_panels_pane_view in Panopoly Widgets 7

Implements hook_fieldable_panels_pane_view().

File

./panopoly_widgets.module, line 608

Code

function panopoly_widgets_fieldable_panels_pane_view($entity, $view_mode, $langcode) {
  if ($entity->bundle == 'image') {

    // Render the image in a link if one is given.
    if (!empty($entity->field_basic_image_link[LANGUAGE_NONE][0]['url'])) {
      $entity->content['field_basic_image_image'][0]['#path'] = array(
        'path' => $entity->field_basic_image_link[LANGUAGE_NONE][0]['display_url'],
      );
    }
  }
}