diff --git a/core/authorize.php b/core/authorize.php index b44c121..8b44e36 100644 --- a/core/authorize.php +++ b/core/authorize.php @@ -109,8 +109,8 @@ function authorize_access_allowed() { } else { $links = array_merge($links, array( - l(t('Administration pages'), 'admin'), - l(t('Front page'), ''), + \Drupal::l(t('Administration pages'), 'system.admin'), + \Drupal::l(t('Front page'), ''), )); } diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 7a45d10..929305c 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -948,7 +948,7 @@ function template_preprocess_status_messages(&$variables) { * class. I.e. we cannot yet convert this jQuery selector to a CSS selector: * jQuery('li:has("a.active")') * - * @see l() + * @see \Drupal\Core\Utility\LinkGenerator * @see \Drupal\Core\Utility\LinkGenerator::generate() * @see system_page_build() */ diff --git a/core/lib/Drupal/Component/Utility/UrlHelper.php b/core/lib/Drupal/Component/Utility/UrlHelper.php index 0c0e07d..cf87435 100644 --- a/core/lib/Drupal/Component/Utility/UrlHelper.php +++ b/core/lib/Drupal/Component/Utility/UrlHelper.php @@ -133,7 +133,7 @@ public static function filterQueryParameters(array $query, array $exclude = arra * - query: An array of query parameters from $url, if they exist. * - fragment: The fragment component from $url, if it exists. * - * @see l() + * @see \Drupal\Core\Utility\LinkGenerator * @see url() * @see http://tools.ietf.org/html/rfc3986 * diff --git a/core/lib/Drupal/Core/Updater/Module.php b/core/lib/Drupal/Core/Updater/Module.php index acc3028..3d3dd41 100644 --- a/core/lib/Drupal/Core/Updater/Module.php +++ b/core/lib/Drupal/Core/Updater/Module.php @@ -98,9 +98,9 @@ public function getSchemaUpdates() { */ public function postInstallTasks() { return array( - l(t('Install another module'), 'admin/modules/install'), - l(t('Enable newly added modules'), 'admin/modules'), - l(t('Administration pages'), 'admin'), + \Drupal::l(t('Install another module'), 'update.module_install'), + \Drupal::l(t('Enable newly added modules'), 'system.modules_list'), + \Drupal::l(t('Administration pages'), 'system.admin'), ); } diff --git a/core/lib/Drupal/Core/Updater/Theme.php b/core/lib/Drupal/Core/Updater/Theme.php index 7e17ddd..0f1ea5b 100644 --- a/core/lib/Drupal/Core/Updater/Theme.php +++ b/core/lib/Drupal/Core/Updater/Theme.php @@ -82,8 +82,8 @@ public function postInstall() { */ public function postInstallTasks() { return array( - l(t('Install newly added themes'), 'admin/appearance'), - l(t('Administration pages'), 'admin'), + \Drupal::l(t('Install newly added themes'), 'system.themes_page'), + \Drupal::l(t('Administration pages'), 'system.admin'), ); } } diff --git a/core/modules/aggregator/src/Controller/AggregatorController.php b/core/modules/aggregator/src/Controller/AggregatorController.php index 6c46b2a..8bccc3d 100644 --- a/core/modules/aggregator/src/Controller/AggregatorController.php +++ b/core/modules/aggregator/src/Controller/AggregatorController.php @@ -121,7 +121,7 @@ public function adminOverview() { $rows = array(); foreach ($feeds as $feed) { $row = array(); - $row[] = l($feed->label(), "aggregator/sources/" . $feed->id()); + $row[] = \Drupal::linkGenerator()->generateFromUrl($feed->label(), $feed->urlInfo()); $row[] = $this->dateFormatter->formatInterval($entity_manager->getStorage('aggregator_item')->getItemCount($feed), '1 item', '@count items'); $last_checked = $feed->getLastCheckedTime(); $refresh_rate = $feed->getRefreshRate(); diff --git a/core/modules/aggregator/src/FeedForm.php b/core/modules/aggregator/src/FeedForm.php index 1832cb5..71acbbd 100644 --- a/core/modules/aggregator/src/FeedForm.php +++ b/core/modules/aggregator/src/FeedForm.php @@ -70,7 +70,7 @@ public function save(array $form, FormStateInterface $form_state) { $form_state->setRedirectUrl($feed->urlInfo('canonical')); } else { - $this->logger('aggregator')->notice('Feed %feed added.', array('%feed' => $feed->label(), 'link' => l($this->t('View'), 'admin/config/services/aggregator'))); + $this->logger('aggregator')->notice('Feed %feed added.', array('%feed' => $feed->label(), 'link' => \Drupal::l($this->t('View'), 'aggregator.admin_overview'))); drupal_set_message($this->t('The feed %feed has been added.', array('%feed' => $feed->label()))); } } diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 861ed73..5fd5d21 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -518,7 +518,10 @@ function theme_book_link(array $variables) { $sub_menu = drupal_render($element['#below']); } $element['#localized_options']['set_active_class'] = TRUE; - $output = l($element['#title'], $element['#href'], $element['#localized_options']); + /** @var \Drupal\Core\Url $url */ + $url = $element['#url']; + $url->setOptions($element['#localized_options'] + $url->getOptions()); + $output = \Drupal::linkGenerator()->generateFromUrl($element['#title'], $url); return '' . $output . $sub_menu . "\n"; } diff --git a/core/modules/book/src/BookManager.php b/core/modules/book/src/BookManager.php index 0035cd3..9c694e0 100644 --- a/core/modules/book/src/BookManager.php +++ b/core/modules/book/src/BookManager.php @@ -99,7 +99,7 @@ protected function loadBooks() { foreach ($book_links as $link) { $nid = $link['nid']; if (isset($nodes[$nid]) && $nodes[$nid]->status) { - $link['link_path'] = 'node/' . $nid; + $link['url'] = $nodes[$nid]->urlInfo(); $link['title'] = $nodes[$nid]->label(); $link['type'] = $nodes[$nid]->bundle(); $this->books[$link['bid']] = $link; @@ -528,7 +528,7 @@ public function bookTreeOutput(array $tree) { $element['#attributes']['class'] = $class; $element['#title'] = $data['link']['title']; $node = $this->entityManager->getStorage('node')->load($data['link']['nid']); - $element['#href'] = $node->url(); + $element['#url'] = $node->urlInfo(); $element['#localized_options'] = !empty($data['link']['localized_options']) ? $data['link']['localized_options'] : array(); $element['#below'] = $data['below'] ? $this->bookTreeOutput($data['below']) : $data['below']; $element['#original_link'] = $data['link']; diff --git a/core/modules/book/src/Controller/BookController.php b/core/modules/book/src/Controller/BookController.php index 305a0b9..4eb1413 100644 --- a/core/modules/book/src/Controller/BookController.php +++ b/core/modules/book/src/Controller/BookController.php @@ -71,8 +71,13 @@ public function adminOverview() { $headers = array(t('Book'), t('Operations')); // Add any recognized books to the table list. foreach ($this->bookManager->getAllBooks() as $book) { + /** @var \Drupal\Core\Url $url */ + $url = $book->urlInfo(); + if (!isset($book['options'])) { + $url->setOptions($book['options']); + } $row = array( - l($book['title'], $book['link_path'], isset($book['options']) ? $book['options'] : array()), + \Drupal::linkGenerator()->generateFromUrl($book['title'], $url), ); $links = array(); $links['edit'] = array( @@ -105,7 +110,7 @@ public function adminOverview() { public function bookRender() { $book_list = array(); foreach ($this->bookManager->getAllBooks() as $book) { - $book_list[] = l($book['title'], $book['link_path']); + $book_list[] = \Drupal::linkGenerator()->generateFromUrl($book['title'], $book['url']); } return array( '#theme' => 'item_list', diff --git a/core/modules/book/src/Form/BookAdminEditForm.php b/core/modules/book/src/Form/BookAdminEditForm.php index 9a2b754..a3056f1 100644 --- a/core/modules/book/src/Form/BookAdminEditForm.php +++ b/core/modules/book/src/Form/BookAdminEditForm.php @@ -121,7 +121,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $node->book['link_title'] = $values['title']; $node->setNewRevision(); $node->save(); - $this->logger('content')->notice('book: updated %title.', array('%title' => $node->label(), 'link' => l($this->t('View'), 'node/' . $node->id()))); + $this->logger('content')->notice('book: updated %title.', array('%title' => $node->label(), 'link' => \Drupal::linkGenerator()->generateFromUrl($this->t('View'), $node->urlInfo()))); } } } diff --git a/core/modules/book/src/Tests/BookTest.php b/core/modules/book/src/Tests/BookTest.php index 2e6e851..0ab9129 100644 --- a/core/modules/book/src/Tests/BookTest.php +++ b/core/modules/book/src/Tests/BookTest.php @@ -187,15 +187,24 @@ function checkBookNode(EntityInterface $node, $nodes, $previous = FALSE, $up = F // Check previous, up, and next links. if ($previous) { - $this->assertRaw(l(' ' . $previous->label(), 'node/' . $previous->id(), array('html' => TRUE, 'attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page')))), 'Previous page link found.'); + /** @var \Drupal\Core\Url $url */ + $url = $previous->urlInfo(); + $url->setOptions(array('html' => TRUE, 'attributes' => array('rel' => array('prev'), 'title' => t('Go to previous page')))); + $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl(' ' . $previous->label(), $url), 'Previous page link found.'); } if ($up) { - $this->assertRaw(l('Up', 'node/' . $up->id(), array('html'=> TRUE, 'attributes' => array('title' => t('Go to parent page')))), 'Up page link found.'); + /** @var \Drupal\Core\Url $url */ + $url = $up->urlInfo(); + $url->setOptions(array('html'=> TRUE, 'attributes' => array('title' => t('Go to parent page')))); + $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl('Up', $url), 'Up page link found.'); } if ($next) { - $this->assertRaw(l($next->label() . ' ', 'node/' . $next->id(), array('html'=> TRUE, 'attributes' => array('rel' => array('next'), 'title' => t('Go to next page')))), 'Next page link found.'); + /** @var \Drupal\Core\Url $url */ + $url = $next->urlInfo(); + $url->setOptions(array('html'=> TRUE, 'attributes' => array('rel' => array('next'), 'title' => t('Go to next page')))); + $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl($next->label() . ' ', $url), 'Next page link found.'); } // Compute the expected breadcrumb. diff --git a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php index 59eb7fc..5df9929 100644 --- a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php +++ b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php @@ -57,12 +57,12 @@ public function testIntegration() { // Setup a watchdog entry without tokens. $entries[] = array( 'message' => $this->randomMachineName(), - 'variables' => array('link' => l('Link', 'node/1')), + 'variables' => array('link' => \Drupal::l('Link', 'entity.node.canonical', ['node' => 1])), ); // Setup a watchdog entry with one token. $entries[] = array( 'message' => '@token1', - 'variables' => array('@token1' => $this->randomMachineName(), 'link' => l('Link', 'node/2')), + 'variables' => array('@token1' => $this->randomMachineName(), 'link' => \Drupal::l('Link', 'entity.node.canonical', ['node' => 2])), ); // Setup a watchdog entry with two tokens. $entries[] = array( @@ -72,7 +72,7 @@ public function testIntegration() { 'variables' => array( '@token1' => $this->randomMachineName(), '!token2' => $this->randomMachineName(), - 'link' => l('Link', 'node/2', array('html' => TRUE)), + 'link' => \Drupal::l('Link', 'entity.node.canonical', ['node' => 2], ['html' => TRUE]), ), ); $logger_factory = $this->container->get('logger.factory'); diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 0e7087d..13e3307 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -536,11 +536,11 @@ function template_preprocess_forums(&$variables) { if ($variables['tid'] != $topic->forum_tid) { $variables['topics'][$id]->moved = TRUE; $variables['topics'][$id]->title = String::checkPlain($topic->getTitle()); - $variables['topics'][$id]->message = l(t('This topic has been moved'), "forum/$topic->forum_tid"); + $variables['topics'][$id]->message = \Drupal::l(t('This topic has been moved'), 'forum.page', ['taxonomy_term' => $topic->forum_tid]); } else { $variables['topics'][$id]->moved = FALSE; - $variables['topics'][$id]->title_link = l($topic->getTitle(), 'node/' . $topic->id()); + $variables['topics'][$id]->title_link = \Drupal::linkGenerator()->generateFromUrl($topic->getTitle(), $topic->urlInfo()); $variables['topics'][$id]->message = ''; } $forum_submitted = array('#theme' => 'forum_submitted', '#topic' => (object) array( diff --git a/core/modules/forum/src/Form/ForumForm.php b/core/modules/forum/src/Form/ForumForm.php index 8ee5f43..eaa6e09 100644 --- a/core/modules/forum/src/Form/ForumForm.php +++ b/core/modules/forum/src/Form/ForumForm.php @@ -79,16 +79,19 @@ public function save(array $form, FormStateInterface $form_state) { $term_storage = $this->entityManager->getStorage('taxonomy_term'); $status = $term_storage->save($term); + $route_name = $this->urlStub == 'container' ? 'forum.edit_container' : 'forum.edit_forum'; + $route_parameters = ['taxonomy_term' => $term->id()]; + $link = \Drupal::l($this->t('Edit'), $route_name, $route_parameters); switch ($status) { case SAVED_NEW: drupal_set_message($this->t('Created new @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType))); - $this->logger('forum')->notice('Created new @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => l($this->t('Edit'), 'admin/structure/forum/edit/' . $this->urlStub . '/' . $term->id()))); + $this->logger('forum')->notice('Created new @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => $link)); $form_state->setValue('tid', $term->id()); break; case SAVED_UPDATED: drupal_set_message($this->t('The @type %term has been updated.', array('%term' => $term->getName(), '@type' => $this->forumFormType))); - $this->logger('forum')->notice('Updated @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => l($this->t('Edit'), 'admin/structure/forum/edit/' . $this->urlStub . '/' . $term->id()))); + $this->logger('forum')->notice('Updated @type %term.', array('%term' => $term->getName(), '@type' => $this->forumFormType, 'link' => $link)); break; } diff --git a/core/modules/statistics/src/Tests/StatisticsReportsTest.php b/core/modules/statistics/src/Tests/StatisticsReportsTest.php index 520e6a4..91b5fa4 100644 --- a/core/modules/statistics/src/Tests/StatisticsReportsTest.php +++ b/core/modules/statistics/src/Tests/StatisticsReportsTest.php @@ -49,7 +49,7 @@ function testPopularContentBlock() { $this->assertText('All time', 'Found the all time popular content.'); $this->assertText('Last viewed', 'Found the last viewed popular content.'); - $this->assertRaw(l($node->label(), 'node/' . $node->id()), 'Found link to visited node.'); + $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl($node->label(), $node->urlInfo()), 'Found link to visited node.'); } } diff --git a/core/modules/syslog/syslog.module b/core/modules/syslog/syslog.module index 85a7311..3124b50 100644 --- a/core/modules/syslog/syslog.module +++ b/core/modules/syslog/syslog.module @@ -33,7 +33,7 @@ function syslog_help($route_name, RouteMatchInterface $route_match) { */ function syslog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) { $config = \Drupal::config('syslog.settings'); - $help = \Drupal::moduleHandler()->moduleExists('help') ? ' ' . l(t('More information'), 'admin/help/syslog') . '.' : NULL; + $help = \Drupal::moduleHandler()->moduleExists('help') ? ' ' . \Drupal::l(t('More information'), 'help.page', ['name' => 'syslog']) . '.' : NULL; $form['syslog_identity'] = array( '#type' => 'textfield', '#title' => t('Syslog identity'), diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 3c3020f..1a2401f 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -1565,7 +1565,7 @@ function hook_requirements($phase) { // Test PHP version $requirements['php'] = array( 'title' => t('PHP'), - 'value' => ($phase == 'runtime') ? l(phpversion(), 'admin/reports/status/php') : phpversion(), + 'value' => ($phase == 'runtime') ? \Drupal::l(phpversion(), 'system.php') : phpversion(), ); if (version_compare(phpversion(), DRUPAL_MINIMUM_PHP) < 0) { $requirements['php']['description'] = t('Your PHP installation is too old. Drupal requires at least PHP %version.', array('%version' => DRUPAL_MINIMUM_PHP)); diff --git a/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php b/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php index 53cd323..4a98207 100644 --- a/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php +++ b/core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php @@ -68,7 +68,7 @@ public function render(ResultRow $values) { )); if ($term->access('update')) { $text = !empty($this->options['text']) ? $this->options['text'] : $this->t('Edit'); - return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination())); + return \Drupal::l($text, 'entity.taxonomy.edit_form', ['taxonomy_term' => $tid], array('query' => drupal_get_destination())); } } } diff --git a/core/modules/taxonomy/src/TermForm.php b/core/modules/taxonomy/src/TermForm.php index 2fa6f4b..1de3ea1 100644 --- a/core/modules/taxonomy/src/TermForm.php +++ b/core/modules/taxonomy/src/TermForm.php @@ -134,14 +134,15 @@ public function buildEntity(array $form, FormStateInterface $form_state) { public function save(array $form, FormStateInterface $form_state) { $term = $this->entity; + $link = \Drupal::linkGenerator()->generateFromUrl($this->t('Edit'), $term->urlInfo('edit-form')); switch ($term->save()) { case SAVED_NEW: drupal_set_message($this->t('Created new term %term.', array('%term' => $term->getName()))); - $this->logger('taxonomy')->notice('Created new term %term.', array('%term' => $term->getName(), 'link' => l($this->t('Edit'), 'taxonomy/term/' . $term->id() . '/edit'))); + $this->logger('taxonomy')->notice('Created new term %term.', array('%term' => $term->getName(), 'link' => $link)); break; case SAVED_UPDATED: drupal_set_message($this->t('Updated term %term.', array('%term' => $term->getName()))); - $this->logger('taxonomy')->notice('Updated term %term.', array('%term' => $term->getName(), 'link' => l($this->t('Edit'), 'taxonomy/term/' . $term->id() . '/edit'))); + $this->logger('taxonomy')->notice('Updated term %term.', array('%term' => $term->getName(), 'link' => $link)); break; } diff --git a/core/modules/taxonomy/src/Tests/TermIndexTest.php b/core/modules/taxonomy/src/Tests/TermIndexTest.php index 54d0dfb..8ad3968 100644 --- a/core/modules/taxonomy/src/Tests/TermIndexTest.php +++ b/core/modules/taxonomy/src/Tests/TermIndexTest.php @@ -217,6 +217,6 @@ function testTaxonomyTermHierarchyBreadcrumbs() { // Verify that the page breadcrumbs include a link to the parent term. $this->drupalGet('taxonomy/term/' . $term1->id()); - $this->assertRaw(l($term2->getName(), 'taxonomy/term/' . $term2->id()), 'Parent term link is displayed when viewing the node.'); + $this->assertRaw(\Drupal::linkGenerator()->generateFromUrl($term2->getName(), $term2->urlInfo()), 'Parent term link is displayed when viewing the node.'); } } diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php index 03b2979..29f6f3b 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php +++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyFieldTidTest.php @@ -28,7 +28,7 @@ function testViewsHandlerTidField() { $this->executeView($view); $actual = $view->field['name']->advancedRender($view->result[0]); - $expected = l($this->term1->label(), $this->term1->getSystemPath()); + $expected = \Drupal::linkGenerator()->generateFromUrl($this->term1->label(), $this->term1->urlInfo()); $this->assertEqual($expected, $actual); } diff --git a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module index bc2ce99..354ac58 100644 --- a/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module +++ b/core/modules/toolbar/tests/modules/toolbar_test/toolbar_test.module @@ -32,9 +32,9 @@ function toolbar_test_toolbar() { 'content' => array( '#theme' => 'item_list', '#items' => array( - l(t('link 1'), '', array('attributes' => array('title' => 'Test link 1 title'))), - l(t('link 2'), '', array('attributes' => array('title' => 'Test link 2 title'))), - l(t('link 3'), '', array('attributes' => array('title' => 'Test link 3 title'))), + \Drupal::l(t('link 1'), '', array('attributes' => array('title' => 'Test link 1 title'))), + \Drupal::l(t('link 2'), '', array('attributes' => array('title' => 'Test link 2 title'))), + \Drupal::l(t('link 3'), '', array('attributes' => array('title' => 'Test link 3 title'))), ), '#attributes' => array( 'class' => array('menu'), diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc index 08cfe93..ff8550d 100644 --- a/core/modules/tracker/tracker.pages.inc +++ b/core/modules/tracker/tracker.pages.inc @@ -85,7 +85,7 @@ function tracker_page($account = NULL) { $row = array( 'type' => String::checkPlain(node_get_type_label($node)), - 'title' => array('data' => l($node->getTitle(), 'node/' . $node->id()) . ' ' . drupal_render($mark_build)), + 'title' => array('data' => \Drupal::linkGenerator()->generateFromUrl($node->getTitle(), $node->urlInfo()) . ' ' . drupal_render($mark_build)), 'author' => array('data' => array('#theme' => 'username', '#account' => $node->getOwner())), 'replies' => array('class' => array('replies'), 'data' => $comments), 'last updated' => array('data' => t('!time ago', array('!time' => \Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $node->last_activity)))), diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 719ee6e..3b4b315 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -1034,7 +1034,7 @@ public function optionLink($text, $section, $class = '', $title = '') { $title = $text; } - return l($text, 'admin/structure/views/nojs/display/' . $this->view->storage->id() . '/' . $this->display['id'] . '/' . $section, array('attributes' => array('class' => array('views-ajax-link', $class), 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE)); + return \Drupal::l($text, 'views_ui.form_display', ['js' => 'nojs', 'view' => $this->view->storage->id(), 'display_id' => $this->display['id'], 'type' => $section], array('attributes' => array('class' => array('views-ajax-link', $class), 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE)); } /** diff --git a/core/modules/views/src/Tests/DefaultViewsTest.php b/core/modules/views/src/Tests/DefaultViewsTest.php index 301fc2c..c02e6e8 100644 --- a/core/modules/views/src/Tests/DefaultViewsTest.php +++ b/core/modules/views/src/Tests/DefaultViewsTest.php @@ -94,7 +94,7 @@ protected function setUp() { if ($i % 2) { $values['promote'] = TRUE; } - $values['body'][]['value'] = l('Node ' . 1, 'node/' . 1); + $values['body'][]['value'] = \Drupal::l('Node ' . 1, 'entity.node.canonical', ['node' => 1]); $node = $this->drupalCreateNode($values);