Problem/Motivation

#options values usually have to run through t() for translation
\Drupal calls should be avoided in classes, use dependency injection instead

Comments

Ashutosh Ahirwal created an issue. See original summary.

ashutosh ahirwal’s picture

Assigned: ashutosh ahirwal » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.73 KB

Providing patch for reference.

  • Ashutosh Ahirwal authored baa7f85d on 1.0.x-alpha1
    Issue #3337905 by Ashutosh Ahirwal: \Drupal calls should be avoided in...
jayhuskins’s picture

Status: Needs review » Fixed

Your patch was a good start. Note that for custom Plugins, they must also implement `ContainerFactoryPluginInterface` in order to use the create method and the construction method must include the configuration, plugin id and plugin definition parameters.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.