Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_news
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_news
Commits
efac5c45
Commit
efac5c45
authored
8 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[FEATURE] Add realurl auto configuration
parent
affcfca0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Hooks/RealUrlAutoConfiguration.php
+62
-0
62 additions, 0 deletions
Classes/Hooks/RealUrlAutoConfiguration.php
ext_localconf.php
+5
-1
5 additions, 1 deletion
ext_localconf.php
with
67 additions
and
1 deletion
Classes/Hooks/RealUrlAutoConfiguration.php
0 → 100644
+
62
−
0
View file @
efac5c45
<?php
namespace
SGalinski\SgNews\Hooks
;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
* 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 2 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!
***************************************************************/
/**
* AutoConfiguration-Hook for RealURL
*/
class
RealUrlAutoConfiguration
{
/**
* Generates additional RealURL configuration and merges it with provided configuration
*
* @param array $params Default configuration
* @return array Updated configuration
*/
public
function
addNewsConfig
(
$params
)
{
return
array_merge_recursive
(
$params
[
'config'
],
[
'postVarSets'
=>
[
'_DEFAULT'
=>
[
'page'
=>
[
[
'GETvar'
=>
'tx_sgnews_pagebrowser[currentPage]'
,
],
],
]
],
'fileName'
=>
[
'index'
=>
[
'news.xml'
=>
[
'keyValues'
=>
[
'type'
=>
78906523
,
],
],
],
],
]
);
}
}
This diff is collapsed.
Click to expand it.
ext_localconf.php
+
5
−
1
View file @
efac5c45
...
...
@@ -71,4 +71,8 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['proc
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'Objects'
][
'TYPO3\CMS\Core\Page\PageRenderer'
]
=
[
'className'
=>
'SGalinski\SgNews\Xclass\PageRenderer'
];
?>
// add realurl configuration
if
(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
isLoaded
(
'realurl'
))
{
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SC_OPTIONS'
][
'ext/realurl/class.tx_realurl_autoconfgen.php'
][
'extensionConfiguration'
][
'sgnews'
]
=
\SGalinski\SgNews\Hooks\RealUrlAutoConfiguration
::
class
.
'->addNewsConfig'
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment