Made forum posting possible.
It has some limitations, though, as ForumTopic.last_post and ForumTopicGroup.last_post is not updated automagically...
This commit is contained in:
@@ -40,6 +40,12 @@ KekRozsak\FrontBundle\Entity\ForumTopic:
|
||||
targetEntity: ForumTopicGroup
|
||||
inversedBy: topics
|
||||
nullable: false
|
||||
oneToOne:
|
||||
last_post:
|
||||
targetEntity: ForumPost
|
||||
nullable: true
|
||||
default: null
|
||||
cascade: [ persist ]
|
||||
uniqueConstraint:
|
||||
uniqueSlugByGroup:
|
||||
columns: [ topic_group, slug ]
|
||||
|
@@ -32,6 +32,12 @@ KekRozsak\FrontBundle\Entity\ForumTopicGroup:
|
||||
targetEntity: User
|
||||
nullable: true
|
||||
default: null
|
||||
oneToOne:
|
||||
last_post:
|
||||
targetEntity: ForumPost
|
||||
nullable: true
|
||||
default: null
|
||||
cascade: [ persist ]
|
||||
oneToMany:
|
||||
topics:
|
||||
targetEntity: ForumTopic
|
||||
|
@@ -22,3 +22,12 @@ KekRozsakFrontBundle_forum_post_list:
|
||||
pattern: /forum/{topicGroupSlug}/{topicSlug}
|
||||
defaults:
|
||||
_controller: KekRozsakFrontBundle:Forum:postList
|
||||
requirements:
|
||||
_method: GET
|
||||
|
||||
KekRozsakFrontBundle_forum_new_post:
|
||||
pattern: /forum/{topicGroupSlug}/{topicSlug}/post
|
||||
defaults:
|
||||
_controller: KekRozsakFrontBundle:Forum:postList
|
||||
requirements:
|
||||
_method: POST
|
||||
|
@@ -15,3 +15,9 @@ services:
|
||||
class: KekRozsak\FrontBundle\Form\Extension\HelpMessageTypeExtension
|
||||
tags:
|
||||
- { name: "form.type_extension", alias: "field" }
|
||||
bb.twig.extension:
|
||||
class: KekRozsak\FrontBundle\Extension\TwigBBExtension
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: "twig.extension" }
|
||||
|
Reference in New Issue
Block a user