Commit 15c58b0d authored by Akshay Dalvi's avatar Akshay Dalvi Committed by Rob Little
Browse files

Issue #3295428 by akshaydalvi212, Harsh panchal: t() calls should be avoided...

Issue #3295428 by akshaydalvi212, Harsh panchal: t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
parent 53f64b7e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ class OptionsGridWidget extends OptionsButtonsWidget {

    $element['size'] = [
      '#type' => 'number',
      '#title' => t('Number of columns'),
      '#title' => $this->t('Number of columns'),
      '#default_value' => $this->getSetting('size'),
      '#required' => TRUE,
      '#min' => 2,
@@ -71,7 +71,7 @@ class OptionsGridWidget extends OptionsButtonsWidget {
    $property_options = $this->getPropertyOptions();

    $summary[] = $this->t('Layout: @property', ['@property' => ($property_options[$this->getSetting('property')]) ?? $property_options['grid']]);
    $summary[] = t('Number of columns: @size', ['@size' => $this->getSetting('size')]);
    $summary[] = $this->t('Number of columns: @size', ['@size' => $this->getSetting('size')]);

    return $summary;
  }