Project

General

Profile

Feature #47435 » FormController.php.6.x.diff

Patrick Broens, 2013-04-24 10:58

View differences:

typo3/sysext/form/Classes/Controller/FormController.php
*/
class FormController {
const SIGNAL_ShowForm = 'ShowForm';
/**
* The TypoScript array
*
......
protected $validate;
/**
* @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
*/
protected $signalSlotDispatcher;
/**
* Initialisation
*
* @param array $typoscript TS configuration for this cObject
......
if ($submittedByPrefix === NULL || !empty($submittedByPrefix) && !$this->validate->isValid() || !empty($submittedByPrefix) && $this->validate->isValid() && $this->requestHandler->getPost('confirmation-false', NULL) !== NULL) {
$show = TRUE;
}
return $show;
$this->emitShowFormSignal($show, $submittedByPrefix);
return (boolean) $show;
}
/**
......
return $content;
}
/**
* Emits the show form signal
*
* @param boolean $showForm Show/Hide the form
* @return void
*/
protected function emitShowFormSignal(&$showForm, $submittedByPrefix) {
$this->getSignalSlotDispatcher()->dispatch(
'TYPO3\\CMS\\Form\\Controller',
self::SIGNAL_ShowForm,
array($this, $submittedByPrefix, &$showForm)
);
}
/**
* Get the SignalSlot dispatcher
*
* @return \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
*/
protected function getSignalSlotDispatcher() {
if (!isset($this->signalSlotDispatcher)) {
$this->signalSlotDispatcher = $this->getObjectManager()->get('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
}
return $this->signalSlotDispatcher;
}
/**
* Get the ObjectManager
*
* @return \TYPO3\CMS\Extbase\Object\ObjectManager
*/
protected function getObjectManager() {
return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
}
}
(3-3/3)