Thanks Mark - will have another go at that tomorrow!
On 14 Jun 2008, at 17:49, Mark D wrote:
>
> I tried to make it work for a project of mine, but there were some
> obscure bugs that came up regularly enough to prove the plugin fatal.
> I contacted the creator of the plugin, but he wasn't able to find the
> solution.
>
> One of the issues was.
> "Fatal error: Maximum function nesting level of '100' reached,
> aborting!".
>
> Therefore, I found it easier to wrote my own custom solution which has
> been working great.
>
> As for using sfPageFlow, here's some of my old sample code.
>
> Action class:
> class whateverActions extends sfPageFlowActions
> {
> // Action States
> // handle ProcessInitialize
> public function executeInitialize()
> {
> $this->flow->clearData();
> $this->flow->transitOnSuccess();
> return $this->flow->execute();
> }
>
> // handle ProcessSetup
> public function executeSetup()
> {
> $this->flow->transitOnSuccess();
> return $this->flow->execute();
> }
>
> public function executeValidate()
> {
> // validate Form on POST
> if ($this->getRequest()->getMethod() == sfRequest::POST)
> {
> // add your validation here
> }
>
> $this->flow->transitOnSuccess();
> return $this->flow->execute();
> }
>
> // Process is confirmed to be purchased, process purchase here
> public function executeSubmit()
> {
> // process the transaction!
> // HERE
>
> // process data
> $this->flow->transitOnSuccess();
> return $this->flow->execute();
> }
>
> }
>
> config/pageflow.yml:
> firstState: ProcessInitialize
> lastState: DisplayResult
> state:
> DisplayForm:
> transition:
> doInput: ProcessValidate
> onError: DisplayForm
> DisplayConfirm:
> transition:
> doConfirm: ProcessSubmit
> doCancel: ProcessInitialize
> doPaymentDetails: DisplayForm
> DisplayResult:
> ProcessInitialize:
> transition:
> onSuccess: ProcessSetup
> onError: DisplayForm
> ProcessSetup:
> transition:
> onSuccess: DisplayForm
> ProcessValidate:
> entry:
> - acceptRequests:
> params: [input_form_name, whatever, blahblahblah]
> transition:
> onSuccess: DisplayConfirm
> onError: DisplayForm
> ProcessSubmit:
> transition:
> onSuccess: DisplayResult
>
> Mark
>
> On Jun 13, 4:34 am, Lee Bolding <[EMAIL PROTECTED]> wrote:
>> Did anybody manage to get the demo working for this?
>>
>> It's still got me stumped :-/
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---