You are here

function tmgmt_translator_load in Translation Management Tool 7

Loads a translator based on the name.

Parameters

$name: The machine-readable name of the translator entity to load.

Return value

TMGMTTranslator A translator entity.

Related topics

12 calls to tmgmt_translator_load()
TMGMTBaseTestCase::setUp in tests/tmgmt.base.test
Overrides DrupalWebTestCase::setUp()
TMGMTCRUDTestCase::testTranslators in tests/tmgmt.crud.test
Test crud operations of translators.
TMGMTEntitySourceUITestCase::testNodeTranslateTabMultipeCheckout in sources/entity/ui/tmgmt_entity_ui.test
Test the translate tab for a single checkout.
TMGMTJob::getTranslator in entity/tmgmt.entity.job.inc
Returns the translator for this job.
TMGMTLocalTestCase::testAllowAll in translators/tmgmt_local/tmgmt_local.test
Test the allow all setting.

... See full list

File

./tmgmt.module, line 874
Main module file for the Translation Management module.

Code

function tmgmt_translator_load($name) {
  $translators = entity_load_multiple_by_name('tmgmt_translator', array(
    $name,
  ));
  return $translators ? reset($translators) : FALSE;
}