/** * * {@inheritdoc} * */ public function prePersist($object) { $user = $this->getConfigurationPool()->getContainer()->get('security.context')->getToken()->getUser(); $object->setUser($user); if ($object->getRawContent()) { $object->setContent($this->formatterPool->transform($object->getContentFormatter(), $object->getRawContent())); } return $object; }
/** * * {@inheritdoc} * */ public function prePersist($object) { $object->setContent($this->formatterPool->transform($object->getContentFormatter(), $object->getRawContent())); return $object; }