a62da047f7ecda466cff73f04a903271a411d2f7
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Http / UrlProcessorInterface.php
1 <?php
2 namespace TYPO3\CMS\Frontend\Http;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * This interface needs to be implemented by all classes that register for the hook in:
19 * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlProcessors']
20 *
21 * It can be used manipulate URLs that are generated by the ContentObjectRenderer.
22 */
23 interface UrlProcessorInterface
24 {
25 const CONTEXT_COMMON = 'common';
26 const CONTEXT_FILE = 'file';
27 const CONTEXT_MAIL = 'mail';
28 const CONTEXT_EXTERNAL = 'external';
29
30 /**
31 * Generates the JumpURL for the given parameters.
32 *
33 * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::processUrl()
34 * @param string $context The context in which the URL is generated (e.g. "typolink" or one of the constants above).
35 * @param string $url The URL that should be processed.
36 * @param array $configuration The link configuration.
37 * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObjectRenderer The calling content object renderer.
38 * @param bool $keepProcessing If this is set to FALSE no further hooks will be processed after the current one.
39 * @return string|NULL
40 */
41 public function process($context, $url, array $configuration, \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObjectRenderer, &$keepProcessing);
42 }