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'); }
public function removeComment(Comment $comment) { $comment->setUser(null); $this->comments->removeElement($comment); return $this; }