Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / redirect / src / Plugin / Field / FieldWidget / RedirectSourceWidget.php
index 729abe45a719c77115138771c208a63539c61290..0a43411167b0115575c79819d7153b0e7f0b372b 100644 (file)
@@ -64,7 +64,7 @@ class RedirectSourceWidget extends WidgetBase {
         //   determine if we have a valid path.
         try {
           \Drupal::service('router')->match('/' . $form_state->getValue(array('redirect_source', 0, 'path')));
-          $element['status_box'][]['#markup'] = '<div class="messages messages--warning">' . t('The source path %path is likely a valid path. It is preferred to <a href="@url-alias">create URL aliases</a> for existing paths rather than redirects.',
+          $element['status_box'][]['#markup'] = '<div class="messages messages--warning">' . $this->t('The source path %path is likely a valid path. It is preferred to <a href="@url-alias">create URL aliases</a> for existing paths rather than redirects.',
               array('%path' => $source_path, '@url-alias' => Url::fromRoute('path.admin_add')->toString())) . '</div>';
         }
         catch (ResourceNotFoundException $e) {
@@ -80,7 +80,7 @@ class RedirectSourceWidget extends WidgetBase {
           $redirects = $repository->findBySourcePath($path);
           if (!empty($redirects)) {
             $redirect = array_shift($redirects);
-            $element['status_box'][]['#markup'] = '<div class="messages messages--warning">' . t('The base source path %source is already being redirected. Do you want to <a href="@edit-page">edit the existing redirect</a>?', array('%source' => $source_path, '@edit-page' => $redirect->url('edit-form'))) . '</div>';
+            $element['status_box'][]['#markup'] = '<div class="messages messages--warning">' . $this->t('The base source path %source is already being redirected. Do you want to <a href="@edit-page">edit the existing redirect</a>?', array('%source' => $source_path, '@edit-page' => $redirect->url('edit-form'))) . '</div>';
           }
         }
       }