/**
  * @return string
  */
 public function buildEntityFormHTML()
 {
     $properties = $this->entityInstance->getProperties();
     foreach ($properties as $property) {
         if ($property->isShown()) {
             $property->buildFormBlock($this->formViewGenerator, $property->getName());
         }
     }
     unset($property);
     $this->formViewGenerator->appendSubmitButton(CREATE_BUTTON_TEXT);
     return $this->formViewGenerator->getBuiltHTML();
 }
Пример #2
0
 /**
  * @param FormViewGenerator $formViewGenerator
  * @param string $name
  */
 public function buildFormBlock($formViewGenerator, $name)
 {
     $formViewGenerator->appendCheckboxBlock($this->label, $name, $this->value);
 }
Пример #3
0
 /**
  * @param FormViewGenerator $formViewGenerator
  * @param string $name
  */
 public function buildFormBlock($formViewGenerator, $name)
 {
     $formViewGenerator->appendTextInputBlock($this->label, $this->value, $name);
 }
Пример #4
0
 /**
  * @param FormViewGenerator $formViewGenerator
  * @param string $name
  */
 public function buildFormBlock($formViewGenerator, $name)
 {
     $formViewGenerator->appendNumberInputBlock($this->label, $this->value, $name, $this->min, $this->max);
 }
Пример #5
0
 /**
  * @param FormViewGenerator $formViewGenerator
  * @param string $name
  */
 public function buildFormBlock($formViewGenerator, $name)
 {
     $valueTextPairs = array();
     $entityInstances = $this->entityInstances;
     foreach ($entityInstances as $entityInstance) {
         $value = $entityInstance->getIdentifier();
         $text = $entityInstance->getDisplayName();
         /*
          * Every entity that will be referenced by another one should have a single primary key
          */
         $valueTextPairs[$value[Entity::PROP_ID]] = $text;
     }
     unset($entityInstance);
     $formViewGenerator->appendSelectBlock($this->label, $name, $valueTextPairs, $this->value);
 }