[TYPO3-mvc] post processing a BE record input (FED?)

Sy Moen josiah.moen at gmail.com
Fri Sep 16 05:11:13 CEST 2011


Thanks... that is a really great answer that should probably be in a manual
or a wiki page somewhere.

I added the feature request in forge. Thanks again.

On Thu, Sep 15, 2011 at 10:32 AM, Claus Due <claus at wildside.dk> wrote:

> Hi Sy,
>
> I guess I'm the right person to answer this question ;)
>
> What you need is a TCEMain hook (you can see how FED does this and copy it,
> Tx_Fed_Backend_TCEMain and ext_localconf.php), then perform your own
> processing in that hook function/class. If you make your extension depend on
> FED then the hooks should be executed in the correct order.
>
> FED only hooks into changes made in the "pages" and "tt_content" tables so
> if you just need to manipulate your own records in your hook, then there is
> no chance of anything breaking (well, except your own records of course).
> You have an argument $table which you can, and indeed should, use for
> conditions to only process records from your particular table(s).
>
> I will definitely consider your idea about having a Controller to execute
> hooks when saving/getting records in BE. Could be quite useful to have
> something like that! Just so I don't forget, could you add a feature request
> at forge[1] please? :)
>
> Keep in mind, though, that the TCEMain hooks all use data arrays with the
> old-style underscored_fieldnames instead of the lowerCamelCase ones, you
> cannot use your records as objects (which unfortunately prevents relation
> processing unless done manually) and finally, you naturally lose all your
> validations and repository functionality (unless you implement property
> mapping through Extbase's PropertyMapper - if you need pointers about this,
> you're welcome to ask).
>
> Cheers,
> Claus the FED-guy.
>
> [1] http://forge.typo3.org/projects/extension-fed/issues
>
> On Sep 15, 2011, at 5:55 PM, Sy Moen wrote:
>
> > If I use the usual create or new action through the frontend it is very
> > simple to post-process input data... which I do a lot in an extension I
> am
> > working on.
> >
> > But, I do not (yet) understand tceMain well enough to figure out how to
> do
> > the post processing in the BE if the record is added there. Is there a
> way
> > to add userFunc post processors in the TCA?
> >
> > Or (even better?) with the new Page and FCE elements in FED[1], can I
> edit
> > the create / new actions for the backend just as I do with the extbase
> > frontend? Maybe (hopefully) using the same create / new action in both
> > places?
> >
> > [1] http://fedext.net/fluid-typo3/
> > _______________________________________________
> > TYPO3-project-typo3v4mvc mailing list
> > TYPO3-project-typo3v4mvc at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list