Mercurial > hg > cmmr2012-drupal-site
diff core/modules/views_ui/src/ViewEditForm.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/core/modules/views_ui/src/ViewEditForm.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/modules/views_ui/src/ViewEditForm.php Thu Feb 28 13:11:55 2019 +0000 @@ -3,7 +3,7 @@ namespace Drupal\views_ui; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\HtmlCommand; use Drupal\Core\Ajax\ReplaceCommand; @@ -325,7 +325,7 @@ $view->save(); - drupal_set_message($this->t('The view %name has been saved.', ['%name' => $view->label()])); + $this->messenger()->addStatus($this->t('The view %name has been saved.', ['%name' => $view->label()])); // Remove this view from cache so we can edit it properly. $this->tempStore->delete($view->id()); @@ -1098,7 +1098,7 @@ $build['fields'][$id]['#class'][] = Html::cleanCssIdentifier($display['id'] . '-' . $type . '-' . $id); if ($executable->display_handler->useGroupBy() && $handler->usesGroupBy()) { - $build['fields'][$id]['#settings_links'][] = $this->l(SafeMarkup::format('<span class="label">@text</span>', ['@text' => $this->t('Aggregation settings')]), new Url('views_ui.form_handler_group', [ + $build['fields'][$id]['#settings_links'][] = $this->l(new FormattableMarkup('<span class="label">@text</span>', ['@text' => $this->t('Aggregation settings')]), new Url('views_ui.form_handler_group', [ 'js' => 'nojs', 'view' => $view->id(), 'display_id' => $display['id'], @@ -1108,7 +1108,7 @@ } if ($handler->hasExtraOptions()) { - $build['fields'][$id]['#settings_links'][] = $this->l(SafeMarkup::format('<span class="label">@text</span>', ['@text' => $this->t('Settings')]), new Url('views_ui.form_handler_extra', [ + $build['fields'][$id]['#settings_links'][] = $this->l(new FormattableMarkup('<span class="label">@text</span>', ['@text' => $this->t('Settings')]), new Url('views_ui.form_handler_extra', [ 'js' => 'nojs', 'view' => $view->id(), 'display_id' => $display['id'], @@ -1147,7 +1147,7 @@ foreach ($contents as $key => $pid) { if ($key != $last) { $operator = $group_info['groups'][$gid] == 'OR' ? $this->t('OR') : $this->t('AND'); - $store[$pid]['#link'] = SafeMarkup::format('@link <span>@operator</span>', ['@link' => $store[$pid]['#link'], '@operator' => $operator]); + $store[$pid]['#link'] = new FormattableMarkup('@link <span>@operator</span>', ['@link' => $store[$pid]['#link'], '@operator' => $operator]); } $build['fields'][$pid] = $store[$pid]; }