abstract class TMGMTDefaultSourcePluginController in Translation Management Tool 7
Default controller class for source plugins.
Hierarchy
- class \TMGMTPluginBase implements TMGMTPluginBaseInterface
- class \TMGMTDefaultSourcePluginController implements TMGMTSourcePluginControllerInterface
Expanded class hierarchy of TMGMTDefaultSourcePluginController
Related topics
File
- plugin/
tmgmt.plugin.source.inc, line 13 - Contains the abstract source base plugin class.
View source
abstract class TMGMTDefaultSourcePluginController extends TMGMTPluginBase implements TMGMTSourcePluginControllerInterface {
/**
* {@inheritdoc}
*/
public function getLabel(TMGMTJobItem $job_item) {
return t('@plugin item unavailable (@item)', array(
'@plugin' => $this->pluginInfo['label'],
'@item' => $job_item->item_type . ':' . $job_item->item_id,
));
}
/**
* {@inheritdoc}
*/
public function getUri(TMGMTJobItem $job_item) {
return array(
'path' => '',
'options' => array(),
);
}
/**
* {@inheritdoc}
*/
public function getItemTypes() {
return isset($this->pluginInfo['item types']) ? $this->pluginInfo['item types'] : array();
}
/**
* {@inheritdoc}
*/
public function getItemTypeLabel($type) {
$types = $this
->getItemTypes();
if (isset($types[$type])) {
return $types[$type];
}
return '';
}
/**
* {@inheritdoc}
*/
public function getType(TMGMTJobItem $job_item) {
return ucfirst($job_item->item_type);
}
/**
* {@inheritdoc}
*/
public function getExistingLangCodes(TMGMTJobItem $job_item) {
return array();
}
}