By dawehner on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Code should not call the global t() function anymore but use a t method on the different objects. For plugins
a new t() method was added on the base class.
Before
use \Drupal\Core\Plugin\PluginBase;
class Example extends PluginBase {
public function someFunction() {
return t('Some description'):
}
}
After
use \Drupal\Core\Plugin\PluginBase;
class Example extends PluginBase {
public function someFunction() {
return $this->t('Some description'):
}
}
See also https://drupal.org/node/2079611
Impacts:
Module developers