Project

General

Profile

Feature #32701 » issue32701.diff

Diff of the changes to implement Oliver's suggestions. - Franz Geiger, 2012-02-13 13:45

View differences:

typo3/sysext/form/Classes/System/Postprocessor/Interface.php
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Interface for postprocessors
*
* @author Franz Geiger <mail@fx-g.de>
* @package TYPO3
* @subpackage form
*/
interface tx_form_System_Postprocessor_Interface {
/**
* Constructor
*
* @param $form tx_form_Domain_Model_Form Form domain model
* @param $typoscript array Post processor TypoScript settings
* @return void
*/
public function __construct(tx_form_Domain_Model_Form $form, array $typoScript);
/**
* The main method called by the post processor
*
* @param mixed $value
* @return mixed
*/
public function process();
}
?>
typo3/sysext/form/Classes/System/Postprocessor/Mail.php
* @package TYPO3
* @subpackage form
*/
class tx_form_System_Postprocessor_Mail {
class tx_form_System_Postprocessor_Mail implements tx_form_System_Postprocessor_Interface {
/**
* @var tx_form_Domain_Model_Form
*/
......
}
}
}
?>
?>
typo3/sysext/form/Classes/System/Postprocessor/Postprocessor.php
$processorArguments = $this->typoScript[$key . '.'];
}
if (class_exists($className, TRUE)) {
$processor = t3lib_div::makeInstance($className, $this->form, $processorArguments);
if(class_exists($this->typoScript[$key], TRUE)) {
$processor = t3lib_div::makeInstance($this->typoScript[$key], $this->form, $processorArguments);
$html .= $processor->process();
} else {
if (class_exists($className, TRUE)) {
$processor = t3lib_div::makeInstance($className, $this->form, $processorArguments);
$html .= $processor->process();
}
}
}
}
......
return $html;
}
}
?>
?>
(1-1/2)