- $titles = array();
- foreach($titleTree as $shortData => $titleData) {
- $title = new Title();
- $title->setShort($shortData);
- $title->setTitle($titleData);
- $title->setCreated(new \DateTime('now'));
- $title->setUpdated(new \DateTime('now'));
- $manager->persist($title);
- $titles[$shortData] = $title;
- unset($title);
+ $civilitys = array();
+ foreach($civilityTree as $shortData => $civilityData) {
+ $civility = new Title($civilityData);
+ $civility->setShort($shortData);
+ $civility->setCreated(new \DateTime('now'));
+ $civility->setUpdated(new \DateTime('now'));
+ $manager->persist($civility);
+ $civilitys[$shortData] = $civility;
+ unset($civility);