|
@@ -19,21 +19,20 @@ class LocationListener
|
|
|
if ($subject && $subject instanceof LocationInterface) {
|
|
|
if ($mapper->hasOpenTab()) {
|
|
|
$mapper
|
|
|
- ->end()
|
|
|
- ->end();
|
|
|
+ ->end()
|
|
|
+ ->end();
|
|
|
}
|
|
|
$options = array(
|
|
|
'translation_domain' => 'MapBundle'
|
|
|
);
|
|
|
$mapper
|
|
|
- ->tab('Map', $options)
|
|
|
- ->with('Location', $options)
|
|
|
- ->add('location', LocationType::class, array(
|
|
|
- 'label' => false,
|
|
|
- ))
|
|
|
- ->end()
|
|
|
- ->end()
|
|
|
- ;
|
|
|
+ ->tab('Map', $options)
|
|
|
+ ->with('Location', $options)
|
|
|
+ ->add('location', LocationType::class, array(
|
|
|
+ 'label' => false,
|
|
|
+ ))
|
|
|
+ ->end()
|
|
|
+ ->end();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -47,22 +46,22 @@ class LocationListener
|
|
|
if ($subject && $subject instanceof LocationInterface) {
|
|
|
if ($mapper->hasOpenTab()) {
|
|
|
$mapper
|
|
|
- ->end();
|
|
|
+ ->end()
|
|
|
+ ->end();
|
|
|
}
|
|
|
$options = array(
|
|
|
'translation_domain' => 'MapBundle',
|
|
|
);
|
|
|
if (!$mapper->has('location')) {
|
|
|
$mapper
|
|
|
- ->tab('Map', $options)
|
|
|
- ->with('Location', $options)
|
|
|
- ->add('location', null, array(
|
|
|
- 'template' => 'LeafletBundle:CRUD:map_show_field.html.twig',
|
|
|
- 'translation_domain' => 'MapBundle',
|
|
|
- ))
|
|
|
- ->end()
|
|
|
- ->end()
|
|
|
- ;
|
|
|
+ ->tab('Map', $options)
|
|
|
+ ->with('Location', $options)
|
|
|
+ ->add('location', null, array(
|
|
|
+ 'template' => 'LeafletBundle:CRUD:map_show_field.html.twig',
|
|
|
+ 'translation_domain' => 'MapBundle',
|
|
|
+ ))
|
|
|
+ ->end()
|
|
|
+ ->end();
|
|
|
}
|
|
|
}
|
|
|
}
|