{t('Field name')} = $variables['field_name']; $entities[] = $record; $bundles[] = $record->bundle; } $variables['bundles_count'] = array_count_values($bundles); $variables['total_bundles'] = count($variables['bundles_count']); $variables['total_entities'] = array_sum($variables['bundles_count']); $variables['entities'] = $entities; } /** * Theme implementation. * * @see template_preprocess_text_formats_report_field_stats() */ function theme_text_formats_report_field_stats(&$variables) { if (count($variables['entities']) < 1) { return '
' . t("No data found.") . '
'; } $content = '' . t("Using the text format: @formats", array('@formats' => implode(', ', $variables['filter_formats']))) . '
'; $content .= theme('table', text_formats_report_prepare_simple_table($variables['bundles_count'], array('Bundle name', 'Entities'))); $content .= '' . t("Using the text format: @formats", array('@formats' => implode(', ', $variables['filter_formats']))) . '
'; $content .= theme('table', text_formats_report_prepare_table($variables['entities'], array(t('Entity ID'), t('Entity type'), t('Bundle'), t('Text format'), t('Content'), t('Field name')))); return $content; }