Exemplo n.º 1
0
 public function fillWith(array $params = [])
 {
     // This form is very tricky: fields may change depending on which
     // country is being submitted!
     // So we first update the format if a new id_country was set.
     if (isset($params['id_country']) && $params['id_country'] != $this->formatter->getCountry()->id) {
         $this->formatter->setCountry(new Country($params['id_country'], $this->language->id));
     }
     return parent::fillWith($params);
 }