Feature #32701

Enable customer postProcessors in different folder

Added by Jan Schreier almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2011-12-19
Due date:
% Done:

100%

PHP Version:
5.3
Tags:
Complexity:
easy
Sprint Focus:

Description

This may be a feature request for a manual extension actually: I like the idea of postprocessores. however so far I only managed to integrate a postprocessor by having the php file holding my postprocessor class in the sysext/form/.../PostProcessor/-folder. Is there a way to define the source of this class elsewhere? e. g. under my fileadmin folders?

I would love to see some typoscript code like
postProcessor {
1 = mail
1 {
...
}
2 = myPostProc
2 {
classFile = /fileadmin/myPostProc.php
...
}
}

If there is any existing solution to add a postProcessor easily, please tell me (and I will come up with a suggestion for the manual)

issue32701.diff View - Diff of the changes to implement Oliver's suggestions. (3.46 KB) Franz Geiger, 2012-02-13 13:45

T3X_postprocessorinterfacetest-0_0_0-z-201202131711.t3x - Extension of a basic custom postprocessor (2.55 KB) Franz Geiger, 2012-02-13 17:14


Related issues

Related to Documentation - Feature #34021: Update Documentation of Form Wizard to include postprocessors Resolved 2012-02-14
Duplicated by Core - Feature #38255: Post processors should be extendable Rejected 2012-06-21

Associated revisions

Revision 91db6ca4 (diff)
Added by Franz Geiger over 5 years ago

[FEATURE] Create interface and enable custom form_postProcessors

PostProcessors now need to implement the
tx_form_System_Postprocessor_Interface.
All classes implementing this interface can be loaded as a
postProcessor by passing its class-name by typoscript.

Before loading the class in the namespace 'tx_form_System_Postprocessor_'
tx_form_System_Postprocessor first tries to load the class passed by
typoscript directly.

Change-Id: I3bea8ce8287a6713f483d7e019cb5f47cdc68cb8
Resolves: #32701
Releases: 6.0
Reviewed-on: http://review.typo3.org/9006
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog

Revision 667d6b95 (diff)
Added by Franz Geiger over 5 years ago

[FEATURE] Create interface and enable custom form_postProcessors

PostProcessors now need to implement the
tx_form_System_Postprocessor_Interface.
All classes implementing this interface can be loaded as a
postProcessor by passing its class-name by typoscript.

Before loading the class in the namespace 'tx_form_System_Postprocessor_'
tx_form_System_Postprocessor first tries to load the class passed by
typoscript directly.

Change-Id: I3bea8ce8287a6713f483d7e019cb5f47cdc68cb8
Resolves: #32701
Releases: 6.0
Reviewed-on: http://review.typo3.org/9006
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog

History

#1 Updated by Oliver Hader almost 6 years ago

  • Target version set to 4.7.0-alpha3
  • Complexity set to easy

Hey Jan,

I'd suggest to use something like that:

2 = tx_myext_WhateverProcessor
2.whatever = setting

In Classes/System/Postprocessor/Postprocessor.php the method process() should be enhanced to check for

class_exists($key)
and if that does not exist, try to create it with the
tx_form_System_Postprocessor_
namespace. Besides that, defining an interface for that would be great - the public method process() is mandatory then.

#2 Updated by Oliver Hader almost 6 years ago

  • Status changed from New to Accepted

#3 Updated by Jan Schreier almost 6 years ago

Hi Oliver,

what ever you suggest. You got waaaaay more experience with Typo3 and programming than I do.

best regards! jan

#4 Updated by Steffen Ritter over 5 years ago

  • Target version changed from 4.7.0-alpha3 to 4.7.0-beta1

#5 Updated by Franz Geiger over 5 years ago

Hey everybody,

I implemented Olivers suggestions in a local git-branche. Before committing it I'd like to run a test. Can please someone help me to write an unit-test (e.g. by pointing to some documentation)?

Thx

#6 Updated by Franz Geiger over 5 years ago

Hi again,

I tested my changes by writing a 'Hello World'-postprocssor extension. Everything seems to work.
How do I commit my changes? Is it sufficient to post the diff here (see previous post)?

Regards

#7 Updated by Stanislas Rolland over 5 years ago

Hi Franz,

It will not be sufficient to post the diff here.

This page explains how to commit and push a change to the TYPO3 Git-branches through Gerrit: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

Before committing, you should also read: http://wiki.typo3.org/CommitMessage_Format_(Git).

Would be a good idea also to upload your test extension here.

Regards,
Stanislas

#8 Updated by Gerrit Code Review over 5 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#9 Updated by Franz Geiger over 5 years ago

Hi Stanislas,

thanks for your help. I've submitted the patch now.

I've attached my test extension.

Regards,
Franz

Stanislas Rolland wrote:

Hi Franz,

It will not be sufficient to post the diff here.

This page explains how to commit and push a change to the TYPO3 Git-branches through Gerrit: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

Before committing, you should also read: http://wiki.typo3.org/CommitMessage_Format_(Git).

Would be a good idea also to upload your test extension here.

Regards,
Stanislas

#10 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#11 Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#12 Updated by Franz Geiger over 5 years ago

Draft documentation is attached in issue #34021.

#13 Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#14 Updated by Steffen Ritter over 5 years ago

  • Target version deleted (4.7.0-beta1)

#15 Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#16 Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#17 Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#18 Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#19 Updated by Gerrit Code Review over 5 years ago

Patch set 9 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9006

#20 Updated by Franz Geiger over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF