|
@@ -236,7 +236,7 @@ abstract class Admin extends ContainerAware
|
|
|
foreach ($selectedFields as $name => $options) {
|
|
|
|
|
|
$description = new FieldDescription;
|
|
|
-
|
|
|
+
|
|
|
if (!is_array($options)) {
|
|
|
$name = $options;
|
|
|
$options = array();
|
|
@@ -565,18 +565,15 @@ abstract class Admin extends ContainerAware
|
|
|
|
|
|
$mapper = new FormMapper($this->getFormBuilder(), $form, $this);
|
|
|
|
|
|
- foreach ($this->getFormFieldDescriptions() as $fieldDescription) {
|
|
|
+ $this->buildFormFieldDescriptions();
|
|
|
|
|
|
- if (!$fieldDescription->getType()) {
|
|
|
+ $this->configureFormFields($mapper);
|
|
|
|
|
|
- continue;
|
|
|
- }
|
|
|
+ foreach ($this->getFormFieldDescriptions() as $fieldDescription) {
|
|
|
|
|
|
$mapper->add($fieldDescription);
|
|
|
}
|
|
|
-
|
|
|
- $this->configureFormFields($mapper);
|
|
|
-
|
|
|
+
|
|
|
return $form;
|
|
|
}
|
|
|
|
|
@@ -594,18 +591,15 @@ abstract class Admin extends ContainerAware
|
|
|
|
|
|
$mapper = new ListMapper($this->getListBuilder(), $list, $this);
|
|
|
|
|
|
- foreach ($this->getListFieldDescriptions() as $fieldDescription) {
|
|
|
-
|
|
|
- if (!$fieldDescription->getType()) {
|
|
|
+ $this->buildListFieldDescriptions();
|
|
|
+
|
|
|
+ $this->configureListFields($mapper);
|
|
|
|
|
|
- continue;
|
|
|
- }
|
|
|
+ foreach ($this->getListFieldDescriptions() as $fieldDescription) {
|
|
|
|
|
|
$mapper->add($fieldDescription);
|
|
|
}
|
|
|
|
|
|
- $this->configureListFields($mapper);
|
|
|
-
|
|
|
return $list;
|
|
|
}
|
|
|
|
|
@@ -624,18 +618,14 @@ abstract class Admin extends ContainerAware
|
|
|
|
|
|
$mapper = new DatagridMapper($this->getDatagridBuilder(), $datagrid, $this);
|
|
|
|
|
|
- foreach ($this->getFilterFieldDescriptions() as $fieldDescription) {
|
|
|
-
|
|
|
- if (!$fieldDescription->getType()) {
|
|
|
+ $this->buildFilterFieldDescriptions();
|
|
|
+ $this->configureDatagridFilters($mapper);
|
|
|
|
|
|
- continue;
|
|
|
- }
|
|
|
+ foreach ($this->getFilterFieldDescriptions() as $fieldDescription) {
|
|
|
|
|
|
$mapper->add($fieldDescription);
|
|
|
}
|
|
|
|
|
|
- $this->configureDatagridFilters($mapper);
|
|
|
-
|
|
|
return $datagrid;
|
|
|
}
|
|
|
|