Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Micke\RieSitepack;
- class RealUrlConf {
- protected function mergeAndReturn($config, $overrule) {
- \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($config, $overrule, TRUE, TRUE, TRUE);
- return $config;
- }
- /**
- * Function creating or altering the postVarSets conf section of RealURL
- * Define the page parameter for paginations
- *
- * @param array $conf The original config array
- * @param tx_realurl_autoconfgen $pObj The realurl autoConf object
- * @return array The realurl conf array
- */
- public function realUrlConfigurer($conf, &$pObj) {
- // Set pageIDs
- $newsDetailPids = ['24', '33'];
- $newsFilterPids = ['36'];
- $newsCategoryPids = ['30'];
- $newsTagPids = [];
- // Apply configuration (defined in core) to existing, non-empty pageID arrays
- if (!empty($newsDetailPids)) {
- foreach ($newsDetailPids as $pid) {
- $configuration['fixedPostVars'][$pid] = 'newsDetailConfiguration';
- }
- };
- if (!empty($newsFilterPids)) {
- foreach ($newsFilterPids as $pid) {
- $configuration['fixedPostVars'][$pid] = 'newsFilterConfiguration';
- }
- };
- if (!empty($newsCategoryPids)) {
- foreach ($newsCategoryPids as $pid) {
- $configuration['fixedPostVars'][$pid] = 'newsCategoryConfiguration';
- }
- };
- if (!empty($newsCategoryPids)) {
- foreach ($newsCategoryPids as $pid) {
- $configuration['fixedPostVars'][$pid] = 'newsTagConfiguration';
- }
- };
- // Merge with conf from RealURL
- $overrule = $configuration;
- return $this->mergeAndReturn($conf['config'], $overrule);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement