The site has been updated to Drupal 7 now that API module is available for it. Thanks @jhodgdon for your awesome work on that module!
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.
| Name | Location | Description |
|---|---|---|
| hook_tmgmt_entity_type_list_query_alter | sources/ | Allows to alter $query used to list entities on specific entity type overview pages. |
| hook_tmgmt_source_plugin_info | ./ | Provide information about source plugins. |
| hook_tmgmt_source_plugin_info_alter | ./ | Alter source plugins information. |
| hook_tmgmt_source_translation_structure | sources/ | Extract translatable text elements from a field. |
| tmgmt_source_is_translatable_item_type | ./ | |
| tmgmt_source_plugin_controller | ./ | Get the plugin controller class for a given source plugin. |
| tmgmt_source_plugin_info | ./ | Determines all available source object plugins. |
| tmgmt_source_plugin_labels | ./ | 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 | ./ | Returns an array of translatable item types of a source plugin. |
| tmgmt_source_ui_controller | ./ | Get the ui controller class for a given source plugin. |
| tmgmt_source_views_controller | ./ | Get the views controller class for a given source plugin. |
| Name | Location | Description |
|---|---|---|
| TMGMTDefaultSourcePluginController | plugin/ | Default controller class for source plugins. |
| TMGMTDefaultSourceUIController | plugin/ | Default ui controller class for source plugin. |
| TMGMTEntityDefaultSourceUIController | sources/ | 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/ | Generic entity ui controller class for source plugin. |
| Name | Location | Description |
|---|---|---|
| TMGMTSourcePluginControllerInterface | plugin/ | Interface for source plugin controllers. |
| TMGMTSourceUIControllerInterface | plugin/ | Interface for source ui controllers. |