/** * сохранение площадки * * @param Platform $platform */ public function save(Platform $platform) { $isNew = $platform->getId() ? false : true; $this->em->persist($platform); $this->em->flush($platform); if ($isNew) { $platform->setHashId($this->hashids->encode($platform->getId())); } $platform->updateUpdatedAt(); $this->tagManager->saveTagging($platform); $this->em->flush(); }