Last active
August 29, 2015 14:23
-
-
Save mneuhaus/b3399d30476a6adccedc to your computer and use it in GitHub Desktop.
extbase realurl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) { | |
| $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration'][$_EXTKEY] = | |
| '\Famelo\MelosRtb\Hooks\RealUrlAutoConfiguration->addMelosRtbConfig'; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Famelo\MelosRtb\Hooks; | |
| /*************************************************************** | |
| * | |
| * Copyright notice | |
| * | |
| * (c) 2014 Marc Neuhaus <mneuhaus@famelo.com>, Famelo | |
| * | |
| * All rights reserved | |
| * | |
| * This script is part of the TYPO3 project. The TYPO3 project is | |
| * free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * The GNU General Public License can be found at | |
| * http://www.gnu.org/copyleft/gpl.html. | |
| * | |
| * This script is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. | |
| * | |
| * This copyright notice MUST APPEAR in all copies of the script! | |
| ***************************************************************/ | |
| /** | |
| */ | |
| class RealUrlAutoConfiguration { | |
| /** | |
| * Generates additional RealURL configuration and merges it with provided configuration | |
| * | |
| * @param array $params Default configuration | |
| * @return array Updated configuration | |
| */ | |
| public function addMelosRtbConfig($params) { | |
| return array_merge_recursive($params['config'], | |
| array( | |
| 'postVarSets' => array( | |
| '_DEFAULT' => array( | |
| 'p' => array( | |
| array( | |
| 'GETvar' => 'tx_melosrtb_components[controller]', | |
| 'noMatch' => 'bypass' | |
| ), | |
| array( | |
| 'GETvar' => 'tx_melosrtb_components[item]', | |
| 'lookUpTable' => array( | |
| 'table' => 'tx_melosrtb_domain_model_component', | |
| 'id_field' => 'uid', | |
| 'alias_field' => 'name', | |
| 'useUniqueCache' => 1, | |
| 'useUniqueCache_conf' => array( | |
| 'strtolower' => 1, | |
| 'spaceCharacter' => '-', | |
| ), | |
| ), | |
| ), | |
| array( | |
| 'GETvar' => 'tx_melosrtb_components[action]', | |
| 'noMatch' => 'bypass', | |
| 'valueMap' => array( | |
| 'contact' => 'contact' | |
| ) | |
| ), | |
| ), | |
| 's' => array( | |
| array( | |
| 'GETvar' => 'tx_melosrtb_systems[controller]', | |
| 'noMatch' => 'bypass' | |
| ), | |
| array( | |
| 'GETvar' => 'tx_melosrtb_systems[item]', | |
| 'lookUpTable' => array( | |
| 'table' => 'tx_melosrtb_domain_model_system', | |
| 'id_field' => 'uid', | |
| 'alias_field' => 'name', | |
| 'useUniqueCache' => 1, | |
| 'useUniqueCache_conf' => array( | |
| 'strtolower' => 1, | |
| 'spaceCharacter' => '-', | |
| ), | |
| ), | |
| ), | |
| array( | |
| 'GETvar' => 'tx_melosrtb_systems[action]', | |
| 'noMatch' => 'bypass', | |
| 'valueMap' => array( | |
| 'contact' => 'contact' | |
| ) | |
| ), | |
| ), | |
| 'a' => array( | |
| array( | |
| 'GETvar' => 'tx_melosrtb_applications[controller]', | |
| 'noMatch' => 'bypass' | |
| ), | |
| array( | |
| 'GETvar' => 'tx_melosrtb_applications[action]', | |
| 'noMatch' => 'bypass' | |
| ), | |
| array( | |
| 'GETvar' => 'tx_melosrtb_applications[item]', | |
| 'lookUpTable' => array( | |
| 'table' => 'tx_melosrtb_domain_model_application', | |
| 'id_field' => 'uid', | |
| 'alias_field' => 'name', | |
| 'useUniqueCache' => 1, | |
| 'useUniqueCache_conf' => array( | |
| 'strtolower' => 1, | |
| 'spaceCharacter' => '-', | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment