Permalink
Browse files

fixed textpage admin

  • Loading branch information...
1 parent 808dc6b commit 53cc8c385aa7c8468242e416e3b182d256b32524 @dutow committed May 11, 2012
@@ -160,6 +160,7 @@ public function newAction()
$textpage = $form->getData();
$em->persist($textpage);
+
if ("section" == $subtype) {
$em->persist($textpage->getSection());
}
@@ -168,6 +169,18 @@ public function newAction()
}
$em->flush();
+ if ("section" == $subtype) {
+ $section = $textpage->getSection();
+ $section->setPage($textpage);
+ $em->persist($section);
+ }
+ if ("round" == $subtype) {
+ $round = $textpage->getRound();
+ $round->setPage($textpage);
+ $em->persist($round);
+ }
+
+ $em->flush();
return $this->redirect($this->generateUrl('admin_textpage_index'));
}else{
@@ -16,7 +16,7 @@ public function process(ContainerBuilder $container)
$registry = $container->getDefinition('eotvos.versenyr.registrationregistry');
foreach ($container->findTaggedServiceIds('eotvos.versenyr.registrationtype') as $id => $attributes) {
- $registry->addMethodCall('register', array(new Reference($id)));
+ $registry->addMethodCall('register', array($id, new Reference($id)));
}
}
}
@@ -15,7 +15,7 @@ public function process(ContainerBuilder $container)
$registry = $container->getDefinition('eotvos.versenyr.roundregistry');
foreach ($container->findTaggedServiceIds('eotvos.versenyr.roundtype') as $id => $attributes) {
- $registry->addMethodCall('register', array(new Reference($id)));
+ $registry->addMethodCall('register', array($id, new Reference($id)));
}
}
}
@@ -10,9 +10,9 @@ public function __construct()
$this->modules = array();
}
- public function register($service_id)
+ public function register($service_name, $service_type)
{
- $this->modules[] = $service_id;
+ $this->modules[$service_name] = $service_type;
}
public function getModuleList()
@@ -48,6 +48,7 @@ public function buildForm(FormBuilder $builder, array $options)
$types[$service] = $obj->getDisplayName();
}
+
$builder->add('start', 'date', array('widget' => 'single_text', 'format' => 'yyyy-MM-dd'));
$builder->add('stop', 'date', array('widget' => 'single_text', 'format' => 'yyyy-MM-dd'));
$builder->add('advanceNo', 'number');

0 comments on commit 53cc8c3

Please sign in to comment.