I recently discovered this great extension has Smart Element Replacement. (I've only been used the smart hook replacement).
One thing thing I noticed is that it use t() for the translatable values.
I try to follow Drupal best practises and my IDE gives me a warnings about these.
t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
(DrupalPractice.Objects.GlobalFunction.GlobalFunction)phpcs
Would it be possible to update the extension to use "$this->t('')" as the default?
Test
Generate a form button by typing: @FormElement ('Button')
I recently discovered this great extension has Smart Element Replacement. (I've only been used the smart hook replacement).
One thing thing I noticed is that it use
t()
for the translatable values. I try to follow Drupal best practises and my IDE gives me a warnings about these.Would it be possible to update the extension to use "$this->t('')" as the default?
Test
@FormElement ('Button')