Loading core/core.services.yml +0 −4 Changes for core/core.services.yml: 0 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -858,10 +858,6 @@ services: - { name: path_processor_inbound, priority: 200 } - { name: path_processor_outbound, priority: 200 } arguments: ['@config.factory'] route_processor_none: class: Drupal\Core\RouteProcessor\RouteProcessorNone tags: - { name: route_processor_outbound, priority: 200 } route_processor_current: class: Drupal\Core\RouteProcessor\RouteProcessorCurrent arguments: ['@current_route_match'] Loading core/lib/Drupal/Core/RouteProcessor/RouteProcessorNone.phpdeleted 100644 → 0 +0 −26 Changes for core/lib/Drupal/Core/RouteProcessor/RouteProcessorNone.php: 0 added lines, 26 removed lines. Original line number Diff line number Diff line <?php /** * @file * Contains \Drupal\Core\RouteProcessor\RouteProcessorNone. */ namespace Drupal\Core\RouteProcessor; use Symfony\Component\Routing\Route; /** * Provides a route processor to replace <none>. */ class RouteProcessorNone implements OutboundRouteProcessorInterface { /** * {@inheritdoc} */ public function processOutbound($route_name, Route $route, array &$parameters) { if ($route_name === '<none>') { $route->setPath(''); } } } core/lib/Drupal/Core/Routing/UrlGenerator.php +5 −0 Changes for core/lib/Drupal/Core/Routing/UrlGenerator.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -192,6 +192,11 @@ public function generateFromRoute($name, $parameters = array(), $options = array $absolute = !empty($options['absolute']); if (!$absolute || !$host = $this->context->getHost()) { if ($route->getOption('_only_fragment')) { return $fragment; } return $base_url . $path . $fragment; } Loading core/modules/locale/tests/modules/locale_test/locale_test.module +1 −1 Changes for core/modules/locale/tests/modules/locale_test/locale_test.module: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ function locale_test_locale_translation_projects_alter(&$projects) { // Instead of the default ftp.drupal.org we use the file system of the test // instance to simulate a remote file location. $url = \Drupal::url('<none>', [], ['absolute' => TRUE]); $url = \Drupal::url('<front>', [], ['absolute' => TRUE]); $remote_url = $url . PublicStream::basePath() . '/remote/'; // Completely replace the project data with a set of test projects. Loading core/modules/system/src/Tests/RouteProcessor/RouteProcessorNoneIntegrationTest.php→core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php +12 −11 Changes for core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php: 12 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ /** * @file * Contains \Drupal\system\Tests\PathProcessor\RouteProcessorNoneIntegrationTest. * Contains \Drupal\system\Tests\PathProcessor\RouteNoneTest. */ namespace Drupal\system\Tests\RouteProcessor; Loading @@ -13,10 +13,11 @@ use Symfony\Component\Routing\Route; /** * @see \Drupal\Core\RouteProcessor\RouteProcessorNone * @see system.routing.yml * @see \Drupal\Core\Routing\UrlGenerator * @group route_processor */ class RouteProcessorNoneIntegrationTest extends KernelTestBase { class RouteNoneTest extends KernelTestBase { /** * {@inheritdoc} Loading Loading @@ -53,8 +54,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/subdir/', \Drupal::url('<none>')); $this->assertEqual('/subdir/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); // Test request with subdir on other page. $server = [ Loading @@ -68,8 +69,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/subdir/', \Drupal::url('<none>')); $this->assertEqual('/subdir/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); // Test request without subdir on the homepage. $server = [ Loading @@ -83,8 +84,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/', \Drupal::url('<none>')); $this->assertEqual('/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); // Test request without subdir on other page. $server = [ Loading @@ -98,8 +99,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/', \Drupal::url('<none>')); $this->assertEqual('/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); } } Loading
core/core.services.yml +0 −4 Changes for core/core.services.yml: 0 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -858,10 +858,6 @@ services: - { name: path_processor_inbound, priority: 200 } - { name: path_processor_outbound, priority: 200 } arguments: ['@config.factory'] route_processor_none: class: Drupal\Core\RouteProcessor\RouteProcessorNone tags: - { name: route_processor_outbound, priority: 200 } route_processor_current: class: Drupal\Core\RouteProcessor\RouteProcessorCurrent arguments: ['@current_route_match'] Loading
core/lib/Drupal/Core/RouteProcessor/RouteProcessorNone.phpdeleted 100644 → 0 +0 −26 Changes for core/lib/Drupal/Core/RouteProcessor/RouteProcessorNone.php: 0 added lines, 26 removed lines. Original line number Diff line number Diff line <?php /** * @file * Contains \Drupal\Core\RouteProcessor\RouteProcessorNone. */ namespace Drupal\Core\RouteProcessor; use Symfony\Component\Routing\Route; /** * Provides a route processor to replace <none>. */ class RouteProcessorNone implements OutboundRouteProcessorInterface { /** * {@inheritdoc} */ public function processOutbound($route_name, Route $route, array &$parameters) { if ($route_name === '<none>') { $route->setPath(''); } } }
core/lib/Drupal/Core/Routing/UrlGenerator.php +5 −0 Changes for core/lib/Drupal/Core/Routing/UrlGenerator.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -192,6 +192,11 @@ public function generateFromRoute($name, $parameters = array(), $options = array $absolute = !empty($options['absolute']); if (!$absolute || !$host = $this->context->getHost()) { if ($route->getOption('_only_fragment')) { return $fragment; } return $base_url . $path . $fragment; } Loading
core/modules/locale/tests/modules/locale_test/locale_test.module +1 −1 Changes for core/modules/locale/tests/modules/locale_test/locale_test.module: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ function locale_test_locale_translation_projects_alter(&$projects) { // Instead of the default ftp.drupal.org we use the file system of the test // instance to simulate a remote file location. $url = \Drupal::url('<none>', [], ['absolute' => TRUE]); $url = \Drupal::url('<front>', [], ['absolute' => TRUE]); $remote_url = $url . PublicStream::basePath() . '/remote/'; // Completely replace the project data with a set of test projects. Loading
core/modules/system/src/Tests/RouteProcessor/RouteProcessorNoneIntegrationTest.php→core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php +12 −11 Changes for core/modules/system/src/Tests/RouteProcessor/RouteNoneTest.php: 12 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ /** * @file * Contains \Drupal\system\Tests\PathProcessor\RouteProcessorNoneIntegrationTest. * Contains \Drupal\system\Tests\PathProcessor\RouteNoneTest. */ namespace Drupal\system\Tests\RouteProcessor; Loading @@ -13,10 +13,11 @@ use Symfony\Component\Routing\Route; /** * @see \Drupal\Core\RouteProcessor\RouteProcessorNone * @see system.routing.yml * @see \Drupal\Core\Routing\UrlGenerator * @group route_processor */ class RouteProcessorNoneIntegrationTest extends KernelTestBase { class RouteNoneTest extends KernelTestBase { /** * {@inheritdoc} Loading Loading @@ -53,8 +54,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/subdir/', \Drupal::url('<none>')); $this->assertEqual('/subdir/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); // Test request with subdir on other page. $server = [ Loading @@ -68,8 +69,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/subdir/', \Drupal::url('<none>')); $this->assertEqual('/subdir/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); // Test request without subdir on the homepage. $server = [ Loading @@ -83,8 +84,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/', \Drupal::url('<none>')); $this->assertEqual('/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); // Test request without subdir on other page. $server = [ Loading @@ -98,8 +99,8 @@ public function testProcessOutbound() { $request_stack->push($request); $request_context->fromRequest($request); $this->assertEqual('/', \Drupal::url('<none>')); $this->assertEqual('/#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); $this->assertEqual('', \Drupal::url('<none>')); $this->assertEqual('#test-fragment', \Drupal::url('<none>', [], ['fragment' => 'test-fragment'])); } }