Commit e6c89ffe authored by François Agneray's avatar François Agneray
Browse files

#70 => done

parent cf6dca26
......@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- In progress...
### Added
- #70: Add endpoint to add or delete an attribute
- #69: Add endpoint to list all columns for a table
- #66: Export all attributes (a=all)
- #48: Export to votable format
......
This diff is collapsed.
......@@ -104,12 +104,50 @@ final class AttributeListAction extends AbstractAction
$attribute->setName($parsedBody['name']);
$attribute->setLabel($parsedBody['label']);
$attribute->setFormLabel($parsedBody['form_label']);
$attribute->setType($parsedBody['type']);
$attribute->setCriteriaDisplay($parsedBody['criteria_display']);
$attribute->setDescription($parsedBody['description']);
$attribute->setOutputDisplay($parsedBody['output_display']);
$attribute->setCriteriaDisplay($parsedBody['criteria_display']);
$attribute->setSearchFlag($parsedBody['search_flag']);
$attribute->setSearchType($parsedBody['search_type']);
$attribute->setOperator($parsedBody['operator']);
$attribute->setType($parsedBody['type']);
$attribute->setMin($parsedBody['min']);
$attribute->setMax($parsedBody['max']);
$attribute->setPlaceholderMin($parsedBody['placeholder_min']);
$attribute->setPlaceholderMax($parsedBody['placeholder_max']);
$attribute->setRenderer($parsedBody['renderer']);
$attribute->setRendererConfig($parsedBody['renderer_config']);
$attribute->setDisplayDetail($parsedBody['display_detail']);
$attribute->setSelected($parsedBody['selected']);
$attribute->setOrderBy($parsedBody['order_by']);
$attribute->setOrderDisplay($parsedBody['order_display']);
$attribute->setSelected(true);
$attribute->setDetail($parsedBody['detail']);
$attribute->setRendererDetail($parsedBody['renderer_detail']);
$attribute->setOptions($parsedBody['options']);
$attribute->setVoUtype($parsedBody['vo_utype']);
$attribute->setVoUcd($parsedBody['vo_ucd']);
$attribute->setVoUnit($parsedBody['vo_unit']);
$attribute->setVoDescription($parsedBody['vo_description']);
$attribute->setVoDatatype($parsedBody['vo_datatype']);
$attribute->setVoSize($parsedBody['vo_size']);
if (is_null($parsedBody['id_criteria_family'])) {
$criteriaFamily = null;
} else {
$criteriaFamily = $this->em->find(
'App\Entity\CriteriaFamily',
$parsedBody['id_criteria_family']
);
}
$attribute->setCriteriaFamily($criteriaFamily);
if (is_null($parsedBody['id_output_category'])) {
$outputCategory = null;
} else {
$outputCategory = $this->em->find(
'App\Entity\OutputCategory',
$parsedBody['id_output_category']
);
}
$attribute->setOutputCategory($outputCategory);
$this->em->persist($attribute);
$this->em->flush();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment