/** * @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(); }
/** * @param FormViewGenerator $formViewGenerator * @param string $name */ public function buildFormBlock($formViewGenerator, $name) { $formViewGenerator->appendCheckboxBlock($this->label, $name, $this->value); }
/** * @param FormViewGenerator $formViewGenerator * @param string $name */ public function buildFormBlock($formViewGenerator, $name) { $formViewGenerator->appendTextInputBlock($this->label, $this->value, $name); }
/** * @param FormViewGenerator $formViewGenerator * @param string $name */ public function buildFormBlock($formViewGenerator, $name) { $formViewGenerator->appendNumberInputBlock($this->label, $this->value, $name, $this->min, $this->max); }
/** * @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); }