|
@@ -50,13 +50,13 @@ class ShowMapper
|
|
|
* @return \Sonata\AdminBundle\Show\ShowMapper
|
|
|
*/
|
|
|
public function add($name, $type = null, array $fieldDescriptionOptions = array())
|
|
|
- {
|
|
|
+ {
|
|
|
if (!$this->currentGroup) {
|
|
|
$this->with($this->admin->getLabel());
|
|
|
}
|
|
|
|
|
|
$fieldKey = ($name instanceof FieldDescriptionInterface) ? $name->getName() : $name;
|
|
|
-
|
|
|
+
|
|
|
$formGroups = $this->admin->getShowGroups();
|
|
|
$formGroups[$this->currentGroup]['fields'][$fieldKey] = $fieldKey;
|
|
|
$this->admin->setShowGroups($formGroups);
|