Merge pull request #2056 from willmorgan/dataobj-validate-injector

NEW use Injector pattern to create ValidationResult in validate
This commit is contained in:
Will Rossiter 2013-06-03 15:55:19 -07:00
commit 2814e43568

View File

@ -978,7 +978,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;
} }