Added very-very basic forum functionality

This commit is contained in:
Polonkai Gergely
2012-07-03 14:11:18 +02:00
parent ffda918ee5
commit 0649408e60
14 changed files with 727 additions and 31 deletions

View File

@@ -0,0 +1,41 @@
KekRozsak\FrontBundle\Entity\ForumTopic:
type: entity
table: forum_topics
id:
id:
type: integer
generator:
strategy: AUTO
fields:
title:
type: string(100)
nullable: false
slug:
type: string(100)
nullable: false
unique: true
created_at:
type: datetime
nullable: false
updated_at:
type: datetime
nullable: true
update_reason:
type: text
nullable: true
manyToOne:
created_by:
targetEntity: User
inversedBy: articles
nullable: false
updated_by:
targetEntity: User
nullable: true
default: null
topic_group:
targetEntity: ForumTopicGroup
inversedBy: topics
nullable: false
uniqueConstraint:
uniqueSlugByGroup:
columns: [ topic_group, slug ]

View File

@@ -0,0 +1,38 @@
KekRozsak\FrontBundle\Entity\ForumTopicGroup:
type: entity
table: forum_topic_groups
id:
id:
type: integer
generator:
strategy: AUTO
fields:
title:
type: string(100)
nullable: false
slug:
type: string(100)
nullable: false
unique: true
created_at:
type: datetime
nullable: false
updated_at:
type: datetime
nullable: true
update_reason:
type: text
nullable: true
manyToOne:
created_by:
targetEntity: User
inversedBy: articles
nullable: false
updated_by:
targetEntity: User
nullable: true
default: null
oneToMany:
topics:
targetEntity: ForumTopic
mappedBy: topic_group

View File

@@ -11,4 +11,14 @@ KekRozsakFrontBundle_article:
KekRozsakFrontBundle_forum_main:
pattern: /forum
defaults:
_controller: KekRozsakFrontBundle:Default:forumMain
_controller: KekRozsakFrontBundle:Forum:main
KekRozsakFrontBundle_forum_topic_list:
pattern: /forum/{topicGroupSlug}
defaults:
_controller: KekRozsakFrontBundle:Forum:topicList
KekRozsakFrontBundle_forum_post_list:
pattern: /forum/{topicGroupSlug}/{topicSlug}
defaults:
_controller: KekRozsakFrontBundle:Forum:postList