12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace Sluggable\Fixture;
- /**
- * @Entity
- */
- class Page
- {
- /**
- * @Id
- * @GeneratedValue
- * @Column(type="integer")
- */
- private $id;
- /**
- * @gedmo:Sluggable
- * @Column(type="string", length=255)
- */
- private $content;
-
- /**
- * @gedmo:Slug(style="camel", separator="_")
- * @Column(type="string", length=128)
- */
- private $slug;
-
- /**
- * @OneToMany(targetEntity="TranslatableArticle", mappedBy="page")
- */
- private $articles;
-
- public function getId()
- {
- return $this->id;
- }
- public function addArticle(TranslatableArticle $article)
- {
- $article->setPage($this);
- $this->articles[] = $article;
- }
- public function getArticles()
- {
- return $this->articles;
- }
- public function setContent($content)
- {
- $this->content = $content;
- }
- public function getContent()
- {
- return $this->content;
- }
-
- public function getSlug()
- {
- return $this->slug;
- }
- }
|