예제 #1
0
 /**
  * Maps request data to form
  *
  * @param FormInterface $form
  */
 public function mapDataToForm(FormInterface $form)
 {
     $this->mapRequestDataToElementCollection($this->data, $form->getChildren());
 }
 /**
  * @param FormInterface $form
  *
  * @return Select
  */
 protected function getBoxTypeSelect(FormInterface $form) : Select
 {
     return $form->getChildren()->get('required_data')->getChildren()->get('boxType');
 }
 /**
  * Returns calculator select element
  *
  * @param FormInterface $form
  *
  * @return \WellCommerce\Component\Form\Elements\Optioned\Select
  */
 private function getCalculatorTypeElement(FormInterface $form)
 {
     return $form->getChildren()->get('costs_data')->getChildren()->get('calculator');
 }
예제 #4
0
 /**
  * Maps all submitted values to model data representation
  *
  * @param FormInterface $form
  */
 public function mapFormToData(FormInterface $form)
 {
     $this->mapElementCollectionToModelData($form->getChildren());
 }
 /**
  * Maps errors messages to all form elements
  *
  * @param ConstraintViolationListInterface $errors
  * @param FormInterface                    $form
  */
 public function mapErrorsToForm(ConstraintViolationListInterface $errors, FormInterface $form)
 {
     $messages = $this->extractMessages($errors);
     $this->mapMessagesToElementCollection($messages, $form->getChildren());
 }