Select Git revision
GlobalFunctionUnitTest.inc
Forked from
project / coder
417 commits behind the upstream repository.

#2720343: Allow global t() and \Drupal calls in static methods
Klaus Purer authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
GlobalFunctionUnitTest.inc 304 B
<?php
class TestForm extends FormBase {
public function buildForm($form, $form_state) {
$form['something'] = t('Example text');
$form['another'] = $this->t('test');
}
public static function example() {
// t() calls are allowed in static methods.
return t('Example text');
}
}