You are here

Translation source in Translation Management Tool 7

Same name and namespace in other branches
  1. 8 tmgmt.api.php \tmgmt_source

A source plugin represents translatable elements on a site.

For example nodes, but also plain strings, menu items, other entities and so on.

To define a source, hook_tmgmt_source_plugin_info() needs to be implemented and a controller class (specified in the info) created.

A source has three separate tasks.

File

./tmgmt.api.php, line 182
Hooks provided by the Translation Management module.

Functions

Namesort descending Location Description
hook_tmgmt_entity_type_list_query_alter sources/entity/tmgmt_entity.api.php Allows to alter $query used to list entities on specific entity type overview pages.
hook_tmgmt_source_plugin_info ./tmgmt.api.php Provide information about source plugins.
hook_tmgmt_source_plugin_info_alter ./tmgmt.api.php Alter source plugins information.
hook_tmgmt_source_suggestions ./tmgmt.api.php Return a list of suggested sources for job items.
hook_tmgmt_source_translation_structure sources/field/tmgmt_field.api.php Extract translatable text elements from a field.
tmgmt_source_is_translatable_item_type ./tmgmt.module
tmgmt_source_plugin_controller ./tmgmt.module Get the plugin controller class for a given source plugin.
tmgmt_source_plugin_info ./tmgmt.module Determines all available source object plugins.
tmgmt_source_plugin_labels ./tmgmt.module Returns an array of all available source plugins with the labels as values and the machine-readable name as the key.
tmgmt_source_translatable_item_types ./tmgmt.module Returns an array of translatable item types of a source plugin.
tmgmt_source_ui_controller ./tmgmt.module Get the ui controller class for a given source plugin.
tmgmt_source_views_controller ./tmgmt.module Get the views controller class for a given source plugin.

Classes

Namesort descending Location Description
TMGMTDefaultSourcePluginController plugin/tmgmt.plugin.source.inc Default controller class for source plugins.
TMGMTDefaultSourceUIController plugin/tmgmt.ui.source.inc Default ui controller class for source plugin.
TMGMTEntityDefaultSourceUIController sources/entity/tmgmt_entity.ui.inc Abstract entity ui controller class for source plugin that provides getEntity() method to retrieve list of entities of specific type. It also allows to implement alter hook to alter the entity query for a specific type.
TMGMTEntitySourceUIController sources/entity/ui/tmgmt_entity_ui.ui.inc Generic entity ui controller class for source plugin.

Interfaces

Namesort descending Location Description
TMGMTSourcePluginControllerInterface plugin/tmgmt.plugin.interface.source.inc Interface for source plugin controllers.
TMGMTSourceUIControllerInterface plugin/tmgmt.ui.interface.source.inc Interface for source ui controllers.