704e0f4355d2a8b254e504e3ca490336cb172b3c
[GitHub/WoltLab/WCF.git] /
1 <?php
2 declare(strict_types=1);
3 namespace wcf\system\template\plugin;
4 use wcf\system\html\simple\HtmlSimpleParser;
5 use wcf\system\template\TemplateScriptingCompiler;
6
7 /**
8 * Template prefilter plugin that replaces simple embedded object placeholders. Not to be meant for
9 * regular use, is currently only utilized in `wcf\data\page\content\PageContent::getParsedTemplate()`.
10 *
11 * @author Alexander Ebert
12 * @copyright 2001-2018 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package WoltLabSuite\Core\System\Template\Plugin
15 * @since 3.0
16 */
17 class SimpleEmbeddedObjectPrefilterTemplatePlugin implements IPrefilterTemplatePlugin {
18 /**
19 * @inheritDoc
20 */
21 public function execute($templateName, $sourceContent, TemplateScriptingCompiler $compiler) {
22 return HtmlSimpleParser::getInstance()->parseTemplate($sourceContent);
23 }
24 }