File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Plugin/GraphQL/DataProducer/Routing Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2424 * consumes = {
2525 * "path" = @ContextDefinition("string",
2626 * label = @Translation("Path")
27+ * ),
28+ * "language" = @ContextDefinition("string",
29+ * label = @Translation("Language"),
30+ * required = FALSE
2731 * )
2832 * }
2933 * )
@@ -90,12 +94,13 @@ public function __construct(
9094 * Resolver.
9195 *
9296 * @param string $path
97+ * @param string $language
9398 * @param \Drupal\Core\Cache\RefinableCacheableDependencyInterface $metadata
9499 *
95100 * @return \Drupal\Core\Url|null
96101 */
97- public function resolve ($ path , RefinableCacheableDependencyInterface $ metadata ) {
98- $ redirect = $ this ->redirectRepository ? $ this ->redirectRepository ->findMatchingRedirect ($ path , []) : NULL ;
102+ public function resolve ($ path , $ language , RefinableCacheableDependencyInterface $ metadata ) {
103+ $ redirect = $ this ->redirectRepository ? $ this ->redirectRepository ->findMatchingRedirect ($ path , [], $ language ) : NULL ;
99104 if ($ redirect !== NULL ) {
100105 $ url = $ redirect ->getRedirectUrl ();
101106 }
You can’t perform that action at this time.
0 commit comments