FILE: D:\xampp\htdocs\drupal9.5\web\modules\contrib\grid_widget\src\Plugin\Field\FieldWidget\OptionsGridWidget.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
42 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
59 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

Comments

Harsh panchal created an issue. See original summary.

Harsh panchal’s picture

Category: Task » Bug report
Status: Active » Needs review
StatusFileSize
new1.51 KB

I have fixed this issue and providing a patch.

akshaydalvi212’s picture

Hello @Harsh panchal,

I will review this patch.

Thanks and regards.

akshaydalvi212’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new50.69 KB

Hello @Harsh panchal,

After applying the patch getting an error and warning as shown below:

I will provide an updated patch to solve the remaining error and warnings.

Thanks and regards.

akshaydalvi212’s picture

Assigned: akshaydalvi212 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.64 KB

Hello all,

Providing the updated patch for eliminating the remaining warnings.
kindly review it and provide your feedback on the same.

Thanks & regards.

atul_ghate’s picture

Assigned: Unassigned » atul_ghate

Hello @akshay
I will review this patch.

littlecoding’s picture

Status: Needs review » Needs work
Related issues: +#3181778: [w/c September 17th] Replace t() with $this->t() in all plugins

Limit the scope of changes included in the patch to the correct use of StringTranslationTrait that is inherited from the PluginBase.

  • akshaydalvi212 authored 15c58b0 on 1.0.x
    Issue #3295428 by akshaydalvi212, Harsh panchal: t() calls should be...
littlecoding’s picture

Assigned: atul_ghate » Unassigned
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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