Now fetching news from the database

This commit is contained in:
Polonkai Gergely
2012-07-03 18:05:09 +02:00
parent 8b0e8e1a29
commit 20fea814e4
6 changed files with 325 additions and 30 deletions

View File

@@ -0,0 +1,39 @@
KekRozsak\FrontBundle\Entity\News:
type: entity
table: news
id:
id:
type: integer
generator:
strategy: AUTO
fields:
created_at:
type: datetime
nullable: false
updated_at:
type: datetime
nullable: true
default: null
update_reason:
type: text
nullable: true
default: null
title:
type: string(100)
nullable: false
slug:
type: string(100)
nullable: false
unique: true
text:
type: text
nullable: false
manyToOne:
created_by:
targetEntity: User
nullable: false
inversedBy: news
updated_by:
targetEntity: User
nullable: true
default: null

View File

@@ -5,3 +5,9 @@ services:
# kek_rozsak_front.example:
# class: %kek_rozsak_front.example.class%
# arguments: [@service_id, "plain_value", %parameter%]
kek_rozsak_front.twig_extension.news:
class: KekRozsak\FrontBundle\Twig\NewsExtension
arguments:
doctrine: @doctrine
tags:
- { name: twig.extension }