Wednesday 05 April 2006 1:29:19 pm - 5 replies
Can somebody give me an example of the usage of eZWizardBase and eZWizardBaseClassLoader ( lib/ezutils/classes/ezwizardbase.php ) ?
eZWizardBase was introduced in eZ 3.5 but it seems that there's no single kernel module that uses it.
Thursday 06 April 2006 3:05:11 pm
Thanks for your reply, Kåre. Can you give a little example or some documentation on how to use it? It could be a powerful base for some custom modules.
Am I correct in saying that each wizard step has to extend the eZWizardBase class and that I need to use the eZWizardBaseClassLoader in a custom module to load the current step from a given steparray?
Some thoughts about a piece of code in eZWizardBaseClassLoader::createClass:
if ( isset( $stepArray['operation'] ) )
{
$operation = $stepArray['operation'];
return $returnClass->$operation();
eZDebug::writeNotice( 'Running : "' . $className . '->' . $operation . '()". Specified in StepArray',
'eZWizardBaseClassLoader::createClass()' );
}
The notice will never be written to the debug output. And why is the operation value not taken from $stepArray[$currentStep]['operation']? A steparray will currently look quite weird (at least to me):
$stepArray = array(
0 => array( 'file' => ..., 'class' => ... ),
1 => array( 'file' => ..., 'class' => ... ),
'operation' => ...
)
The comments for the eZWizardBase::preCheck function are stating that you can return false so the step doesn't get processed, but in eZWizardBase::run it's return value isn't used.
But probably I'm using it the wrong way, so any documentation is welcome. Thanks!
Friday 28 April 2006 10:25:51 am
I've just uploaded the User Creator extension ( http://ez.no/community/contribs/import_export/user_creator ) which uses eZWizardBase. I think it's a nice example.
Monday 29 May 2006 5:34:35 pm
Hi Kristof
I'm fixing the operation bug you pointed out now. The way it worked was kind of useless, as you pointed out. See: http://ez.no/bugs/view/8380
You must be logged in to post messages in this topic!