mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
commit
cd1bd2a5a7
@ -217,7 +217,7 @@ class FormRequestHandler extends RequestHandler
|
|||||||
|
|
||||||
// Action handlers may throw ValidationExceptions.
|
// Action handlers may throw ValidationExceptions.
|
||||||
try {
|
try {
|
||||||
// Or we can use the Valiator attached to the form
|
// Or we can use the Validator attached to the form
|
||||||
$result = $this->form->validationResult();
|
$result = $this->form->validationResult();
|
||||||
if (!$result->isValid()) {
|
if (!$result->isValid()) {
|
||||||
return $this->getValidationErrorResponse($result);
|
return $this->getValidationErrorResponse($result);
|
||||||
@ -247,7 +247,7 @@ class FormRequestHandler extends RequestHandler
|
|||||||
return $this->invokeFormHandler($field, ...$args);
|
return $this->invokeFormHandler($field, ...$args);
|
||||||
}
|
}
|
||||||
} catch (ValidationException $e) {
|
} catch (ValidationException $e) {
|
||||||
// The ValdiationResult contains all the relevant metadata
|
// The ValidationResult contains all the relevant metadata
|
||||||
$result = $e->getResult();
|
$result = $e->getResult();
|
||||||
$this->form->loadMessagesFrom($result);
|
$this->form->loadMessagesFrom($result);
|
||||||
return $this->getValidationErrorResponse($result);
|
return $this->getValidationErrorResponse($result);
|
||||||
|
@ -184,7 +184,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
|
|||||||
* Returns the SQL query that will be used to get this DataList's records. Good for debugging. :-)
|
* Returns the SQL query that will be used to get this DataList's records. Good for debugging. :-)
|
||||||
*
|
*
|
||||||
* @param array $parameters Out variable for parameters required for this query
|
* @param array $parameters Out variable for parameters required for this query
|
||||||
* @return string The resulting SQL query (may be paramaterised)
|
* @return string The resulting SQL query (may be parameterised)
|
||||||
*/
|
*/
|
||||||
public function sql(&$parameters = [])
|
public function sql(&$parameters = [])
|
||||||
{
|
{
|
||||||
@ -363,7 +363,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a copy of this list which only includes items with these charactaristics
|
* Return a copy of this list which only includes items with these characteristics
|
||||||
*
|
*
|
||||||
* @see SS_List::filter()
|
* @see SS_List::filter()
|
||||||
*
|
*
|
||||||
|
@ -729,7 +729,7 @@ class Permission extends DataObject implements TemplateGlobalProvider, Resettabl
|
|||||||
|
|
||||||
public function provideI18nEntities()
|
public function provideI18nEntities()
|
||||||
{
|
{
|
||||||
$keys = parent::provideI18nEntities(); // TODO: Change the autogenerated stub
|
$keys = parent::provideI18nEntities();
|
||||||
|
|
||||||
// Localise all permission categories
|
// Localise all permission categories
|
||||||
$keys[__CLASS__ . '.AdminGroup'] = 'Administrator';
|
$keys[__CLASS__ . '.AdminGroup'] = 'Administrator';
|
||||||
|
@ -30,7 +30,7 @@ class DatetimeFieldTest extends SapphireTest
|
|||||||
{
|
{
|
||||||
DBDatetime::clear_mock_now();
|
DBDatetime::clear_mock_now();
|
||||||
date_default_timezone_set($this->timezone);
|
date_default_timezone_set($this->timezone);
|
||||||
parent::tearDown(); // TODO: Change the autogenerated stub
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFormSaveInto()
|
public function testFormSaveInto()
|
||||||
|
Loading…
Reference in New Issue
Block a user