You are here

public function TMGMTTestSourcePluginController::getUri in Translation Management Tool 7

Returns the Uri for this job item.

Parameters

TMGMTJobItem $job_item: The job item entity.

Overrides TMGMTDefaultSourcePluginController::getUri

See also

entity_uri()

File

tests/tmgmt_test.plugin.source.inc, line 13
Contains the test source plugin.

Class

TMGMTTestSourcePluginController
@file Contains the test source plugin.

Code

public function getUri(TMGMTJobItem $job_item) {

  // Provide logic which allows to test for source which is either accessible
  // or not accessible to anonymous user. This is may then be used to test if
  // the source url is attached to the job comment sent to a translation
  // service.
  $path = 'node';
  if ($job_item->item_type == 'test_not_accessible') {
    $path = 'admin';
  }
  return array(
    'path' => $path,
    'options' => array(),
  );
}