Merge pull request #3427 from dhensby/patch-4

Use injector to create `ValidationResult`
This commit is contained in:
Sean Harvey 2014-08-23 11:53:57 +12:00
commit 13ca45411c

View File

@ -1001,7 +1001,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* @return A {@link ValidationResult} object * @return A {@link ValidationResult} object
*/ */
protected function validate() { protected function validate() {
$result = new ValidationResult(); $result = ValidationResult::create();
$this->extend('validate', $result); $this->extend('validate', $result);
return $result; return $result;
} }