/** * @return TYPO3\CMS\Core\TypoScript\TemplateService */ public static function getTSTemplate() { if (!is_object(self::$tmpl)) { if ($GLOBALS['TSFE']->tmpl) { self::$tmpl = $GLOBALS['TSFE']->tmpl; } else { self::$tmpl = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getTemplateServiceClass()); self::$tmpl->init(); self::$tmpl->tt_track = 0; } } return self::$tmpl; }
/** * Set a single trivial dataset * * @param object The parent Dataset object * @param array The array with TypoScript properties for the object */ private function datasetTrivial($arrConf) { $dataSet =& tx_pbimagegraph::factory('dataset'); if (is_array($arrConf)) { $strName = $arrConf['name']; $dataSet->setName($strName); $templateServiceClass = tx_rnbase_util_Typo3Classes::getTemplateServiceClass(); $arrKeys = $templateServiceClass::sortedKeyList($arrConf); foreach ($arrKeys as $strKey) { $strValue = $arrConf[$strKey]; if (intval($strKey) && !strstr($strKey, '.')) { if ($strValue == 'point') { $mixX = $arrConf[$strKey . '.']['x']; if ($arrConf[$strKey . '.']['y'] == 'null') { $mixY = NULL; } elseif (is_array($arrConf[$strKey . '.']['y.'])) { $mixY = $arrConf[$strKey . '.']['y.']; } else { $mixY = $arrConf[$strKey . '.']['y']; } $strId = $arrConf[$strKey . '.']['id']; $dataSet->addPoint($mixX, $mixY, $strId); } } } } return $dataSet; }
/** * Get Axis * * @param object Reference object * @param array Configuration of the data selector */ function getAxis(&$objRef, $arrConf) { $intAxis = 1; foreach ($arrConf as $strKey => $strValue) { $strKey = rtrim($strKey, '.'); eval("\$intAxis = IMAGE_GRAPH_AXIS_" . strtoupper($strKey) . ";"); $objAxis =& $objRef->getAxis($intAxis); $this->setAxisProperties($objAxis, $strValue); $this->setElementProperties($objAxis, $strValue); if (is_array($strValue)) { $templateServiceClass = tx_rnbase_util_Typo3Classes::getTemplateServiceClass(); $arrKeys = $templateServiceClass::sortedKeyList($strValue); foreach ($arrKeys as $strKey) { $strCobjName = $strValue[$strKey]; if (intval($strKey) && !strstr($strKey, '.')) { $arrConfAxis = $strValue[$strKey . '.']; switch ($strCobjName) { case 'marker': $this->setAxisMarker($objRef, $intAxis, $arrConfAxis); break; } } } } } }