Пример #1
0
 public function setFormValues(Article $article = null)
 {
     if ($article) {
         $this->get('name')->setValue($article->getName());
         $this->get('code')->setValue($article->getCode());
         $this->get('salesPrice')->setValue($article->getSalesPrice());
         $this->get('qty')->setValue($article->getQuantity());
         $this->get('description')->setValue($article->getDescription());
         if ($article->getUom()) {
             $this->get('uom')->setValue($article->getUom()->getId());
         }
     }
 }