You are here

function theme_field_collection_tabs in Field Collection Tab formatter 7

Default implementation of theme_field_collection_tabs().

1 theme call to theme_field_collection_tabs()
field_collection_tabs_field_formatter_view in ./field_collection_tabs.module
Implements hook_field_formatter_view().

File

./field_collection_tabs.module, line 167
Provides formatter for field collections on tabs @copyright Copyright(c) 2012 Previous Next Pty Ltd @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html @author Lee Rowlands larowlan at previousnext dot com dot au

Code

function theme_field_collection_tabs($variables) {
  $titles = $tabs = array();
  foreach ($variables['titles'] as $delta => $title) {
    $tab_id = drupal_clean_css_identifier($variables['field_name'] . '-tab-' . $delta);
    $titles[] = theme('field_collection_tabs_tab_title', array(
      'title' => $title,
      'tab_id' => $tab_id,
    ));
    $tabs[] = theme('field_collection_tabs_tab', array(
      'tab' => $variables['tabs'][$delta],
      'tab_id' => $tab_id,
    ));
  }
  return theme('item_list', array(
    'items' => $titles,
  )) . implode('', $tabs);
}