Last active
December 25, 2015 19:39
-
-
Save peterjmit/7029437 to your computer and use it in GitHub Desktop.
Revisions
-
peterjmit revised this gist
Oct 17, 2013 . 1 changed file with 20 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ Entity\TranslatableEntity: type: entity gedmo: translation: entity: Entity\Translation id: id: type: integer fields: some_array_data: type: array gedmo: - translatable oneToMany: translations: targetEntity: Entity\Translation mappedBy: object cascade: [ persist, remove ] -
peterjmit created this gist
Oct 17, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ <?php namespace Entity; use Gedmo\Translatable\Entity\MappedSuperclass\AbstractPersonalTranslation; class Translation extends AbstractPersonalTranslation { public function setContent($value) { if (is_array($value)) { $value = serialize($value); } return parent::setContent($value); } }