mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
Added getPreviousStepFromDatabase() to return the previous step class record from the database (if it exists!)
This commit is contained in:
parent
6baef78fd3
commit
22d9241021
@ -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 ####################
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user