NEW use Injector pattern to create ValidationResult in validate

helps for custom validation implementations
This commit is contained in:
Will Morgan 2013-06-03 17:12:58 +02:00
parent 0ecec24688
commit 2a91d27ccb

View File

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