function theme_fe_paths_config_data in File Entity Paths 7.2
1 theme call to theme_fe_paths_config_data()
- fe_paths_config_table_form in ./
fe_paths.admin.inc - Form builder for File Entity Paths configuration list table.
File
- ./
fe_paths.module, line 679 - Contains functions for the File Entity Paths module.
Code
function theme_fe_paths_config_data($vars) {
$data = $vars['config']->data;
$items = array();
if (isset($data['file_entity'])) {
$enabled_types = array();
foreach ($data['file_entity'] as $key => $val) {
if ($key === $val) {
$enabled_types[] = $val;
}
}
$items[] = t('File types processed: @types', array(
'@types' => !empty($enabled_types) ? implode(', ', $enabled_types) : ' - ',
));
}
if (isset($data['entity'])) {
$entities = fe_paths_get_fieldable_entities();
$bundles = fe_paths_get_bundle_names($data['entity']);
$items[] = t('Entity: @entity', array(
'@entity' => $entities[$data['entity']],
));
$fields_text = array();
if (isset($data['bundle'])) {
foreach ($data['bundle'] as $bundle_key => $bundle) {
foreach ($bundle as $field_name => $field) {
if ($bundle[$field_name]) {
$fields_text[] = $bundles[$bundle_key] . ': ' . $field_name;
}
}
}
if (!empty($fields_text)) {
$items[] = t('In fields: !bundle', array(
'!bundle' => theme('item_list', array(
'items' => $fields_text,
)),
));
}
}
}
return theme('item_list', array(
'items' => $items,
));
}