silverstripe-frameworktest/code/multiform/TestMultiFormPage.php

28 lines
520 B
PHP
Raw Normal View History

<?php
2015-12-17 21:20:49 +01:00
class TestMultiFormPage extends Page
{
}
2017-01-15 09:19:56 +01:00
class TestMultiFormPage_Controller extends PageController
2015-12-17 21:20:49 +01:00
{
2017-01-15 09:19:56 +01:00
2015-12-17 21:20:49 +01:00
public function Form()
{
$form = new TestMultiForm($this, 'Form', new FieldList(), new FieldList());
2015-12-17 21:20:49 +01:00
return $form;
}
2017-01-15 09:19:56 +01:00
2015-12-17 21:20:49 +01:00
public function FormMessage()
{
if (Session::get('MultiFormMessage')) {
$message = Session::get('MultiFormMessage');
Session::clear('MultiFormMessage');
2017-01-15 09:19:56 +01:00
2015-12-17 21:20:49 +01:00
return $message;
}
2017-01-15 09:19:56 +01:00
2015-12-17 21:20:49 +01:00
return false;
}
}