You are here

protected function TMGMTI18nStringSourcePluginController::getI18nObjectWrapper in Translation Management Tool 7

Helper function to get i18n_object_wrapper for given job item.

Parameters

TMGMTJobItem $job_item:

Return value

i18n_string_object_wrapper

4 calls to TMGMTI18nStringSourcePluginController::getI18nObjectWrapper()
TMGMTI18nStringSourcePluginController::getData in sources/i18n_string/tmgmt_i18n_string.plugin.inc
Returns an array with the data structured for translation.
TMGMTI18nStringSourcePluginController::getExistingLangCodes in sources/i18n_string/tmgmt_i18n_string.plugin.inc
Gets existing translation language codes of the job item source.
TMGMTI18nStringSourcePluginController::getLabel in sources/i18n_string/tmgmt_i18n_string.plugin.inc
Return a title for this job item.
TMGMTI18nStringSourcePluginController::getUri in sources/i18n_string/tmgmt_i18n_string.plugin.inc
Returns the Uri for this job item.

File

sources/i18n_string/tmgmt_i18n_string.plugin.inc, line 152
Provides the i18n string source controller.

Class

TMGMTI18nStringSourcePluginController
Translation plugin controller for i18n strings.

Code

protected function getI18nObjectWrapper(TMGMTJobItem $job_item) {
  list(, $type, $object_id) = explode(':', $job_item->item_id, 3);
  return tmgmt_i18n_string_get_wrapper($job_item->item_type, (object) array(
    'type' => $type,
    'objectid' => $object_id,
  ));
}