TestHtmlSource.php in Translation Management Tool 8
File
tmgmt_test/src/Plugin/tmgmt/Source/TestHtmlSource.php
View source
<?php
namespace Drupal\tmgmt_test\Plugin\tmgmt\Source;
use Drupal\tmgmt\JobItemInterface;
class TestHtmlSource extends TestSource {
public function getData(JobItemInterface $job_item) {
return array(
'dummy' => array(
'deep_nesting' => array(
'#text' => file_get_contents(drupal_get_path('module', 'tmgmt') . '/tests/testing_html/sample.html'),
'#label' => 'Label for job item with type ' . $job_item
->getItemType() . ' and id ' . $job_item
->getItemId() . '.',
),
),
);
}
}