-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched from DataProcessor to lib.parseFunc_RTE
- Loading branch information
1 parent
0d96497
commit b628dc5
Showing
2 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Quellenform\Iconpack\UserFunc; | ||
|
||
/* | ||
* This file is part of the "iconpack" Extension for TYPO3 CMS. | ||
* | ||
* Conceived and written by Stephan Kellermayr | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
*/ | ||
|
||
use Quellenform\Iconpack\Html\IconpackHtmlParser; | ||
use TYPO3\CMS\Core\Html\HtmlParser; | ||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
|
||
final class ParseFuncRte | ||
{ | ||
|
||
/** | ||
* This replaces all <span> tags that contain the "data-iconfig" attribute. | ||
* | ||
* @param string The content to be processed. | ||
* @param array TypoScript properties. | ||
* @return string The content with replaced icon-tags. | ||
*/ | ||
public function replaceIcons(string $content, array $conf): string | ||
{ | ||
/** @var HtmlParser $htmlParser */ | ||
$htmlParser = GeneralUtility::makeInstance(HtmlParser::class); | ||
return GeneralUtility::makeInstance(IconpackHtmlParser::class)->transformIconsForOutput( | ||
$content, | ||
$htmlParser | ||
); | ||
} | ||
} |
This file contains 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