function PotxTestD8::test_func in Translation template extractor 6.3
Same name and namespace in other branches
- 7.2 tests/potx_test_8.module \PotxTestD8::test_func()
File
- tests/
potx_test_8.module, line 65 - File used purely to test the parser in potx.
Class
- PotxTestD8
- Test parsing Drupal 8 $this->t and formatPlural function calls.
Code
function test_func() {
// In the real world, we'd also need to define "function t", and inject
// the translation service. please refer to https://drupal.org/node/2079611
// for an example.
$test_translation = $this
->t('Using t inside D8 classes ($this->t)');
}