‪TYPO3CMS  ‪main
LoadRegisterContentObject.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 {
30  public function ‪render($conf = [])
31  {
32  $frontendController = $this->‪getTypoScriptFrontendController();
33  $frontendController->registerStack[] = $frontendController->register;
34  if (is_array($conf)) {
35  $isExecuted = [];
36  foreach ($conf as $theKey => $theValue) {
37  $register = rtrim($theKey, '.');
38  if (!isset($isExecuted[$register]) || !$isExecuted[$register]) {
39  $registerProperties = $register . '.';
40  if (isset($conf[$register]) && isset($conf[$registerProperties])) {
41  $theValue = $this->cObj->stdWrap($conf[$register], $conf[$registerProperties]);
42  } elseif (isset($conf[$registerProperties])) {
43  $theValue = $this->cObj->stdWrap('', $conf[$registerProperties]);
44  }
45  $frontendController->register[$register] = $theValue;
46  $isExecuted[$register] = true;
47  }
48  }
49  }
50  return '';
51  }
52 }
‪TYPO3\CMS\Frontend\ContentObject
Definition: AbstractContentObject.php:18
‪TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject\render
‪string render($conf=[])
Definition: LoadRegisterContentObject.php:30
‪TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject
Definition: LoadRegisterContentObject.php:22
‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
Definition: AbstractContentObject.php:31
‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject\getTypoScriptFrontendController
‪getTypoScriptFrontendController()
Definition: AbstractContentObject.php:79