3 namespace Drupal\Core\PathProcessor;
5 use Drupal\Core\Render\BubbleableMetadata;
6 use Symfony\Component\HttpFoundation\Request;
9 * Defines an interface for classes that process the outbound path.
11 interface OutboundPathProcessorInterface {
14 * Processes the outbound path.
17 * The path to process, with a leading slash.
18 * @param array $options
19 * (optional) An associative array of additional options, with the following
21 * - 'query': An array of query key/value-pairs (without any URL-encoding)
22 * to append to the URL.
23 * - 'fragment': A fragment identifier (named anchor) to append to the URL.
24 * Do not include the leading '#' character.
25 * - 'absolute': Defaults to FALSE. Whether to force the output to be an
26 * absolute link (beginning with http:). Useful for links that will be
27 * displayed outside the site, such as in an RSS feed.
28 * - 'language': An optional language object used to look up the alias
29 * for the URL. If $options['language'] is omitted, it defaults to the
30 * current language for the language type LanguageInterface::TYPE_URL.
31 * - 'https': Whether this URL should point to a secure location. If not
32 * defined, the current scheme is used, so the user stays on HTTP or HTTPS
33 * respectively. TRUE enforces HTTPS and FALSE enforces HTTP.
34 * - 'base_url': Only used internally by a path processor, for example, to
35 * modify the base URL when a language dependent URL requires so.
36 * - 'prefix': Only used internally, to modify the path when a language
37 * dependent URL requires so.
38 * - 'route': The route object for the given path. It will be set by
39 * \Drupal\Core\Routing\UrlGenerator::generateFromRoute().
40 * @param \Symfony\Component\HttpFoundation\Request $request
41 * The HttpRequest object representing the current request.
42 * @param \Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata
43 * (optional) Object to collect path processors' bubbleable metadata.
48 public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL);