Exemple #1
0
 public function setDefaultOptions(OptionsResolverInterface $resolver)
 {
     //        niechginie(Comment::getClassNamespace());
     $resolver->setDefaults(array('data_class' => Comment::getClassNamespace()));
 }
 public static function getConfig()
 {
     return array('class' => Comment::getClassNamespace(), 'web' => AbstractApp::getRootDir() . '/web', 'dirtmp' => '/media/uploads/comments_tmp', 'dir' => '/media/uploads/comments', 'file' => '#^user\\.comments\\.\\d+\\.file#', 'field' => 'path');
 }
Exemple #3
0
 public function removeComment(Comment $comment)
 {
     $comment->setUser(null);
     $this->comments->removeElement($comment);
     return $this;
 }