function globallink_get_translatable_node_types in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.7 globallink.inc \globallink_get_translatable_node_types()
- 7.6 globallink.inc \globallink_get_translatable_node_types()
Gets translatable node types.
Parameters
bool $content_translation: Whether or not to translate the content.
Return value
array Array of translatable node types.
4 calls to globallink_get_translatable_node_types()
- globallink_dashboard_node_filter_form in ./
globallink_send_translations.inc - Builds form to filter GlobalLink nodes to send for translation on dashboard.
- globallink_dashboard_node_form in ./
globallink_send_translations.inc - Builds form to create a GlobalLink submission.
- globallink_entity_dashboard_filter_form in globallink_entity/
globallink_entity_send.inc - Builds form to filter entities to send for translation on dashboard.
- globallink_entity_dashboard_form in globallink_entity/
globallink_entity_send.inc - Builds form to create an entity submission.
File
- ./
globallink.inc, line 856 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_get_translatable_node_types($content_translation) {
$arr = array();
$node_types = node_type_get_types();
foreach ($node_types as $node_type) {
if ($content_translation) {
if (translation_supported_type($node_type->type)) {
$arr[] = $node_type->type;
}
}
else {
if (entity_translation_node_supported_type($node_type->type)) {
$arr[] = $node_type->type;
}
}
}
return $arr;
}