Added getPreviousStepFromDatabase() to return the previous step class record from the database (if it exists!)

This commit is contained in:
Sean Harvey 2008-04-21 05:06:47 +00:00
parent 6baef78fd3
commit 22d9241021

View File

@ -197,6 +197,17 @@ class MultiFormStep extends DataObject {
} }
} }
/**
* Retrieves the previous step record from the database.
*
* @return MultiFormStep subclass
*/
public function getPreviousStepFromDatabase() {
if($prevStepClass = $this->getPreviousStep()) {
return DataObject::get_one($prevStepClass, "SessionID = {$this->SessionID}");
}
}
// ##################### Utility #################### // ##################### Utility ####################
/** /**