Create documentation for message localization

Also define the `translator` param to the related rules in
`AbstractNestedException`.
This commit is contained in:
Henrique Moody 2015-10-07 10:13:50 -03:00
commit 937fa6b183
4 changed files with 87 additions and 0 deletions

View file

@ -108,6 +108,19 @@ class AbstractNestedException extends ValidationException implements NestedValid
}
}
public function setParam($name, $value)
{
parent::setParam($name, $value);
if ('translator' === $name) {
foreach ($this->getRelated(true) as $related) {
$related->setParam($name, $value);
}
}
return $this;
}
public function getRelatedByName($name)
{
foreach ($this->getIterator(true) as $e) {