/**
  * Load the TypoScript Conf Array in the Backend
  *
  * @param array $conf
  * @param integer $pageUid
  * @param boolean $noPageUidSubmit
  * @return array
  */
 private static function loadTS(&$conf, $pageUid = 0, $noPageUidSubmit = FALSE)
 {
     $pid = $noPageUidSubmit == FALSE ? self::getPid() : self::getPid($pageUid);
     // Fixed bug, if page properties the pid must be determined not by given pageUid
     #if ( ($pid === NULL) || ($pid <= 0) ) return FALSE;
     if (\KERN23\ContentDesigner\Helper\GeneralHelper::isModuleAcceptable() === FALSE) {
         return FALSE;
     }
     $ps = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class);
     $rootline = $ps->getRootLine($pid);
     if (empty($rootline)) {
         return FALSE;
     }
     unset($ps);
     $tsObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\TemplateService::class);
     $tsObj->tt_track = 0;
     $tsObj->init();
     $tsObj->runThroughTemplates($rootline);
     $tsObj->generateConfig();
     return $tsObj->setup;
 }
 /**
  * Registers the content element as plugin
  *
  * @param $newElementKey
  * @param $newElementConfig
  * @return void
  */
 private static function addPlugin($newElementKey, $newElementConfig)
 {
     if (strlen($newElementConfig['iconSmall']) > 0) {
         if (@file_exists($newElementConfig['iconSmall'])) {
             self::$iconRegistry->registerNewIcon($newElementKey . '-iconSmall', $newElementConfig['iconSmall']);
             $newElementConfig['iconSmall'] = $newElementKey . '-iconSmall';
         }
     } else {
         $newElementConfig['iconSmall'] = 'contentdesigner-defaultSmall';
     }
     ExtensionManagementUtility::addPlugin(array(GeneralHelper::translate($newElementConfig['title']), $newElementKey, $newElementConfig['iconSmall']), \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT);
 }