/** * @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(); }
/** * @return bool */ public function update() { $nameValuePairsToSet = array(); $properties = $this->entityInstance->getProperties(); foreach ($properties as $property) { $nameValuePairsToSet[$property->getColName()] = $property->getValue(); } unset($property); $filters = $this->entityInstance->getIdentifier(); $updateQuery = new UpdateQuery($this->tableName, $nameValuePairsToSet, $filters); $result = $updateQuery->exec(); return $result; }