public function setFormValues(Template $template = null) { if ($template) { $this->get('code')->setValue($template->getCode()); $this->get('name')->setValue($template->getName()); $this->get('titleEt')->setValue($template->getTitleEt()); $this->get('titleEn')->setValue($template->getTitleEn()); $this->get('contentEt')->setValue($template->getContentEt()); $this->get('contentEn')->setValue($template->getContentEn()); } return $this; }