mirror of
https://github.com/silverstripe/silverstripe-multiform
synced 2024-10-22 11:05:49 +02:00
ENHANCEMENT Allowing $filter argument in MultiForm->getSavedSteps()
This commit is contained in:
parent
32d56ade02
commit
60c69adf7e
@ -282,15 +282,13 @@ abstract class MultiForm extends Form {
|
||||
* If you want a full chain of steps regardless if they've already been saved
|
||||
* to the database, use {@link getAllStepsLinear()}.
|
||||
*
|
||||
* @param String $filter SQL WHERE statement
|
||||
* @return DataObjectSet|boolean A set of MultiFormStep subclasses
|
||||
*/
|
||||
function getSavedSteps() {
|
||||
return DataObject::get(
|
||||
'MultiFormStep',
|
||||
sprintf("\"SessionID\" = '%s'",
|
||||
$this->session->ID
|
||||
)
|
||||
);
|
||||
function getSavedSteps($filter = null) {
|
||||
$filter .= ($filter) ? ' AND ' : '';
|
||||
$filter .= sprintf("\"SessionID\" = '%s'", $this->session->ID);
|
||||
return DataObject::get('MultiFormStep', $filter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user