only in patch2: unchanged: --- a/src/Plugin/Block/UberAffiliateBlock.php +++ b/src/Plugin/Block/UberAffiliateBlock.php @@ -58,14 +58,14 @@ class UberAffiliateBlock extends BlockBase { $username = SafeMarkup::checkPlain($result->name); $name = (!empty($homepage)) ? Link::fromTextAndUrl($username, $homepage) : Link::fromTextAndUrl($username, \Drupal::service('path.alias_manager')->getAliasByPath('user/' . $result->uid)); $rows[] = array( - array('data' => t('#@rank', array('@rank' => $rank++))), + array('data' => $this->t('#@rank', array('@rank' => $rank++))), array('data' => $name), ); } } if (empty($rows)) { - $rows[] = array(array('data' => t('No affiliate activity found for this time period.'), 'colspan' => '2')); + $rows[] = array(array('data' => $this->t('No affiliate activity found for this time period.'), 'colspan' => '2')); } $output = [ @@ -76,7 +76,7 @@ class UberAffiliateBlock extends BlockBase { if ($results_count && $results_count > $limit) { $output .= [ '#theme' => 'more_link', - array('url' => \Drupal::service('path.alias_manager')->getAliasByPath('affiliate/top-users'), 'title' => t('More')), + array('url' => \Drupal::service('path.alias_manager')->getAliasByPath('affiliate/top-users'), 'title' => $this->t('More')), ]; } return $output;