Esempio n. 1
0
 /**
  * Initialize additional class properties
  */
 public function initConfiguration()
 {
     parent::initConfiguration();
     //echo 's';
     $this->templatePath = $this->exportConfiguration->getSettings('templatePath');
     Tx_PtExtbase_Assertions_Assert::isNotEmptyString($this->templatePath, array('message' => 'No template path given for fluid export! 1284621481'));
     $this->setTemplatePathAndFilename(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($this->templatePath));
     $this->paperSize = strtolower($this->exportConfiguration->getSettings('paperSize'));
     Tx_PtExtbase_Assertions_Assert::isNotEmptyString($this->paperSize, array('message' => 'No PaperSize given for the PDF output! 1322585559'));
     $this->paperOrientation = $this->exportConfiguration->getSettings('paperOrientation');
     Tx_PtExtbase_Assertions_Assert::isInArray($this->paperOrientation, array('portrait', 'landscape'), array('message' => 'The Orientation must either be portrait or landscape! 1322585560'));
     $this->cssFilePath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($this->exportConfiguration->getSettings('cssFilePath'));
     Tx_PtExtbase_Assertions_Assert::isTrue(file_exists($this->cssFilePath), array('message' => 'The CSS File with the filename ' . $this->cssFilePath . ' can not be found. 1322587627'));
     $this->dompdfSourcePath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($this->exportConfiguration->getSettings('dompdfSourcePath'));
     Tx_PtExtbase_Assertions_Assert::isTrue(is_dir($this->dompdfSourcePath), array('message' => 'DomPdf source in path ' . $this->dompdfSourcePath . ' was not found. 1322753515'));
     $this->dompdfSourcePath = substr($this->dompdfSourcePath, -1, 1) == '/' ? $this->dompdfSourcePath : $this->dompdfSourcePath . '/';
 }
Esempio n. 2
0
 /**
  * Build the SQL Query for an aggregate
  *
  * @param Tx_PtExtlist_Domain_Configuration_Data_Aggregates_AggregateConfig $aggregateConfig
  * @return string
  */
 protected function buildAggregateFieldSQLByConfig(Tx_PtExtlist_Domain_Configuration_Data_Aggregates_AggregateConfig $aggregateConfig)
 {
     $supportedMethods = array('sum', 'avg', 'min', 'max', 'count');
     if ($aggregateConfig->getSpecial()) {
         $aggregateFieldSQL = $aggregateConfig->getSpecial();
     } else {
         Tx_PtExtbase_Assertions_Assert::isInArray($aggregateConfig->getMethod(), $supportedMethods, array('info' => 'The given aggregate method "' . $aggregateConfig->getMethod() . '" is not supported by this DataBackend'));
         $aggregateFieldSQL = strtoupper($aggregateConfig->getMethod()) . '(' . $aggregateConfig->getFieldIdentifier() . ')';
     }
     $aggregateFieldSQL .= ' AS ' . $aggregateConfig->getIdentifier();
     return $aggregateFieldSQL;
 }
Esempio n. 3
0
 private function initTypoScriptSettings()
 {
     $this->fluidTemplatePath = $this->exportConfiguration->getSettings('templatePath');
     Tx_PtExtbase_Assertions_Assert::isNotEmptyString($this->fluidTemplatePath, array('message' => 'No template path given for fluid export! 1284621481'));
     $this->setTemplatePathAndFilename(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($this->fluidTemplatePath));
     // TODO take a look at http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf_0.10.0_rc2-doc.html for further information on parameters!
     // --page-size	<Size>	Set paper size to: A4, Letter, etc. (default A4)
     $this->size = strtolower($this->exportConfiguration->getSettings('paperSize'));
     Tx_PtExtbase_Assertions_Assert::isNotEmptyString($this->size, array('message' => 'No PaperSize given for the PDF output! 1322585559'));
     // TODO take a look at http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf_0.10.0_rc2-doc.html for further informatoin on parameters
     // --orientation	<orientation>	Set orientation to Landscape or Portrait (default Portrait)
     $this->orient = $this->exportConfiguration->getSettings('paperOrientation');
     Tx_PtExtbase_Assertions_Assert::isInArray($this->orient, array('portrait', 'landscape'), array('message' => 'The Orientation must either be portrait or landscape! 1322585560'));
     $this->cssFilePath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($this->exportConfiguration->getSettings('cssFilePath'));
     Tx_PtExtbase_Assertions_Assert::isTrue(file_exists($this->cssFilePath), array('message' => 'The CSS File with the filename ' . $this->cssFilePath . ' can not be found. 1322587627'));
     $this->additionalWkhtmlParams = $this->exportConfiguration->getSettings('additionalWkhtmlParams');
     $this->wkhtmlHeaderHtml = $this->exportConfiguration->getSettings('wkhtmlHeaderHtml');
     $this->wkhtmlFooterHtml = $this->exportConfiguration->getSettings('wkhtmlFooterHtml');
 }