function lingotek_get_profiles in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 lingotek.module \lingotek_get_profiles()
- 7.5 lingotek.module \lingotek_get_profiles()
- 7.6 lingotek.module \lingotek_get_profiles()
10 calls to lingotek_get_profiles()
- lingotek_admin_profile_manage in ./
lingotek.admin.inc - lingotek_bulk_grid_parse_table_data in ./
lingotek.bulk_grid.inc - lingotek_entity_info_alter in ./
lingotek.module - Implements hook_entity_info_alter().
- lingotek_get_enabled_entities_by_type in ./
lingotek.util.inc - Get all entities enabled for Lingotek, by entity type
- lingotek_get_language_override_form in ./
lingotek.module - Display the Lingotek language-override form field
File
- ./
lingotek.module, line 1324
Code
function lingotek_get_profiles($build_objects = TRUE) {
$profiles = variable_get('lingotek_profiles', array());
if (empty($profiles)) {
$profiles[] = array(
'name' => 'Automatic',
'auto_upload' => 1,
'auto_download' => 1,
);
$profiles[] = array(
'name' => 'Manual',
'auto_upload' => 0,
'auto_download' => 0,
);
variable_set('lingotek_profiles', $profiles);
}
if (!$build_objects) {
return $profiles;
}
$profile_objects = array();
foreach ($profiles as $id => $attributes) {
$profile_objects[$id] = LingotekProfile::loadById($id);
}
return $profile_objects;
}