vendor/perfectneeds/content-multi-lang-bundle/Entity/Translation/PostTranslation.php line 12

Open in your IDE?
  1. <?php
  2. namespace PN\ContentBundle\Entity\Translation;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use PN\LocaleBundle\Model\EditableTranslation;
  5. use PN\LocaleBundle\Model\TranslationEntity;
  6. /**
  7. * @ORM\MappedSuperclass
  8. */
  9. class PostTranslation extends TranslationEntity implements EditableTranslation {
  10. /**
  11. * @var array
  12. *
  13. * @ORM\Column(name="content", type="json")
  14. */
  15. protected $content = [
  16. 'brief' => '',
  17. 'description' => '',
  18. ];
  19. /**
  20. * @var Language
  21. * @ORM\Id
  22. * @ORM\ManyToOne(targetEntity="PN\LocaleBundle\Entity\Language")
  23. */
  24. protected $language;
  25. /**
  26. * Set content
  27. *
  28. * @param array $content
  29. *
  30. * @return PostTranslation
  31. */
  32. public function setContent($content) {
  33. $this->content = $content;
  34. return $this;
  35. }
  36. /**
  37. * Get content
  38. *
  39. * @return array
  40. */
  41. public function getContent() {
  42. return $this->content;
  43. }
  44. }