You are here

function tmgmt_translator_create in Translation Management Tool 7

Creates a translator entity.

Parameters

$plugin: The plugin of the translator.

$name: The machine-readable name of the translator.

$label: The label of the translator.

$description: (Optional) The description of the translator. Defaults to an empty string.

$settings: (Optional) An array of settings for the translator.

$values: (Optional) Array of additional entity values.

Return value

TMGMTTranslator The created, not yet saved, translator entity.

Related topics

1 call to tmgmt_translator_create()
tmgmt_translator_auto_create in ./tmgmt.module
Auto creates a translator from a translator plugin definition.

File

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

Code

function tmgmt_translator_create($plugin, $name, $label, $description = '', $settings = array(), $values = array()) {
  return entity_create('tmgmt_translator', array_merge($values, array(
    'plugin' => $plugin,
    'name' => $name,
    'label' => $label,
    'description' => $description,
    'settings' => $settings,
  )));
}