tripal_chado.theme.inc 849 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * This theme function is meant to override the data_combo theme.
  4. *
  5. * @param $variables
  6. */
  7. function theme_tripal_chado_date_combo($variables) {
  8. $element = $variables['element'];
  9. $field = field_info_field($element['#field_name']);
  10. $instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
  11. // Group start/end items together in fieldset.
  12. $fieldset = [
  13. '#title' => t($element['#title']) . ' ' . ($element['#delta'] > 0 ? intval($element['#delta'] + 1) : ''),
  14. '#value' => '',
  15. '#description' => !empty($element['#fieldset_description']) ? $element['#fieldset_description'] : '',
  16. '#attributes' => [],
  17. '#children' => $element['#children'],
  18. '#attributes' => ['class' => ['collapsible', 'collapsed']],
  19. ];
  20. return theme('fieldset', ['element' => $fieldset]);
  21. }