Exemplo n.º 1
0
 /**
  *      * {@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;
 }
Exemplo n.º 2
0
 /**
  *      * {@inheritdoc}
  *           */
 public function prePersist($object)
 {
     $object->setContent($this->formatterPool->transform($object->getContentFormatter(), $object->getRawContent()));
     return $object;
 }