[TYPO3-dev] TCA Backend Input form Validation

Satish Maurya satish04mca at gmail.com
Fri Dec 5 15:23:01 CET 2014


Thanks a lot Stephan. Got it.

Is there any TYPO3 documentation link for the further reading about it?

Thanks again.
Satish



On Fri, Dec 5, 2014 at 7:18 PM, Stephan Großberndt <
s.grossberndt at sidebysite.de> wrote:

> You need a hook in ext_localconf.php
>
> // Adds mobdb hooks to the tcemain
> //  "processDatamapClass" = new, update
> //  "processCmdmapClass" = move, copy, delete, undelete, localize, version
> etc.
> $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.
> t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:myext/Classes/Service/
> TceMainHooks.php:Tx_Myext_Service_TceMainHooks';
> $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.
> t3lib_tcemain.php']['processCmdmapClass'][] = 'EXT:myext/Classes/Service/
> TceMainHooks.php:Tx_Myext_Service_TceMainHooks';
>
> which may implement certain methods
>
> myext/Classes/Service/TceMainHooks.php:
>
> class Tx_Myext_Service_TceMainHooks {
>
>         /**
>          * This method is called by a hook in the TYPO3 Core Engine
> (TCEmain) when a record is saved.
>          *
>          * @param       array           $fieldArray: The field names and
> their values to be processed
>          * @param       string          $table: The table TCEmain is
> currently processing
>          * @param       string          $id: The records id (if any)
>          * @param       object  $reference: Reference to the parent object
> (TCEmain)
>          * @return      void
>          * @access public
>          */
>         function processDatamap_preProcessFieldArray(&$fieldArray,
> $table, $id, &$pObj) {
>
>                 if ($table == 'tx_myext_record' && !stristr($id, 'NEW') &&
> $fieldArray['status'] == 'under_review') {
>                         // Send mail
>                 }
>
>                 if ($table == 'tx_myext_record' &&
> $fieldArray['starttime'] > $fieldArray['endtime']) {
>                                         $reference->log($table, $id, 2, 0,
> 1, 'starttime > endtime');
>
>                 }
>         }
>
> }
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



-- 
*Thanks & regards,*
Satish Maurya



More information about the TYPO3-dev mailing list