‪TYPO3CMS  ‪main
ContentObjectArrayInternalContentObject.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 
18 use Psr\Log\LogLevel;
21 
26 {
33  public function ‪render($conf = [])
34  {
35  if (!is_array($conf)) {
36  $this->‪getTimeTracker()->‪setTSlogMessage('No elements in this content object array (COA_INT).', LogLevel::WARNING);
37  return '';
38  }
39 
40  $frontendController = $this->‪getTypoScriptFrontendController();
41  $substKey = 'INT_SCRIPT.' . $frontendController->uniqueHash();
42  $content = '<!--' . $substKey . '-->';
43  $frontendController->config['INTincScript'][$substKey] = [
44  'conf' => $conf,
45  'cObj' => serialize($this->cObj),
46  'type' => 'COA',
47  ];
48  return $content;
49  }
50 
54  protected function ‪getTimeTracker()
55  {
56  return GeneralUtility::makeInstance(TimeTracker::class);
57  }
58 }
‪TYPO3\CMS\Frontend\ContentObject
Definition: AbstractContentObject.php:18
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject\render
‪string render($conf=[])
Definition: ContentObjectArrayInternalContentObject.php:33
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject\getTimeTracker
‪TimeTracker getTimeTracker()
Definition: ContentObjectArrayInternalContentObject.php:54
‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
Definition: AbstractContentObject.php:31
‪TYPO3\CMS\Core\TimeTracker\TimeTracker\setTSlogMessage
‪setTSlogMessage(string $content, string $logLevel=LogLevel::INFO)
Definition: TimeTracker.php:143
‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject\getTypoScriptFrontendController
‪getTypoScriptFrontendController()
Definition: AbstractContentObject.php:79
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject
Definition: ContentObjectArrayInternalContentObject.php:26
‪TYPO3\CMS\Core\TimeTracker\TimeTracker
Definition: TimeTracker.php:34