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
|
* If you want a full chain of steps regardless if they've already been saved
|
||||||
* to the database, use {@link getAllStepsLinear()}.
|
* to the database, use {@link getAllStepsLinear()}.
|
||||||
*
|
*
|
||||||
|
* @param String $filter SQL WHERE statement
|
||||||
* @return DataObjectSet|boolean A set of MultiFormStep subclasses
|
* @return DataObjectSet|boolean A set of MultiFormStep subclasses
|
||||||
*/
|
*/
|
||||||
function getSavedSteps() {
|
function getSavedSteps($filter = null) {
|
||||||
return DataObject::get(
|
$filter .= ($filter) ? ' AND ' : '';
|
||||||
'MultiFormStep',
|
$filter .= sprintf("\"SessionID\" = '%s'", $this->session->ID);
|
||||||
sprintf("\"SessionID\" = '%s'",
|
return DataObject::get('MultiFormStep', $filter);
|
||||||
$this->session->ID
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user