forked from doctrine-extensions/DoctrineExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[translatable] started implementation f personal translations for mon…
…go ODM
- Loading branch information
Showing
11 changed files
with
513 additions
and
41 deletions.
There are no files selected for viewing
147 changes: 147 additions & 0 deletions
147
lib/Gedmo/Translatable/Document/AbstractPersonalTranslation.php
This file contains 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 characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,147 @@ | |||
<?php | |||
|
|||
namespace Gedmo\Translatable\Document; | |||
|
|||
use Doctrine\ODM\MongoDB\Mapping\Annotations\MappedSuperclass; | |||
use Doctrine\ODM\MongoDB\Mapping\Annotations\Id; | |||
use Doctrine\ODM\MongoDB\Mapping\Annotations\String; | |||
|
|||
/** | |||
* Gedmo\Translatable\Document\AbstractPersonalTranslation | |||
* | |||
* @MappedSuperclass | |||
*/ | |||
abstract class AbstractPersonalTranslation | |||
{ | |||
/** | |||
* @var integer $id | |||
* | |||
* @Id | |||
*/ | |||
protected $id; | |||
|
|||
/** | |||
* @var string $locale | |||
* | |||
* @String | |||
*/ | |||
protected $locale; | |||
|
|||
/** | |||
* Related entity with ManyToOne relation | |||
* must be mapped by user | |||
*/ | |||
protected $object; | |||
|
|||
/** | |||
* @var string $field | |||
* | |||
* @String | |||
*/ | |||
protected $field; | |||
|
|||
/** | |||
* @var text $content | |||
* | |||
* @String | |||
*/ | |||
protected $content; | |||
|
|||
/** | |||
* Get id | |||
* | |||
* @return integer $id | |||
*/ | |||
public function getId() | |||
{ | |||
return $this->id; | |||
} | |||
|
|||
/** | |||
* Set locale | |||
* | |||
* @param string $locale | |||
* @return AbstractPersonalTranslation | |||
*/ | |||
public function setLocale($locale) | |||
{ | |||
$this->locale = $locale; | |||
return $this; | |||
} | |||
|
|||
/** | |||
* Get locale | |||
* | |||
* @return string $locale | |||
*/ | |||
public function getLocale() | |||
{ | |||
return $this->locale; | |||
} | |||
|
|||
/** | |||
* Set field | |||
* | |||
* @param string $field | |||
* @return AbstractPersonalTranslation | |||
*/ | |||
public function setField($field) | |||
{ | |||
$this->field = $field; | |||
return $this; | |||
} | |||
|
|||
/** | |||
* Get field | |||
* | |||
* @return string $field | |||
*/ | |||
public function getField() | |||
{ | |||
return $this->field; | |||
} | |||
|
|||
/** | |||
* Set object related | |||
* | |||
* @param object $object | |||
* @return AbstractPersonalTranslation | |||
*/ | |||
public function setObject($object) | |||
{ | |||
$this->object = $object; | |||
return $this; | |||
} | |||
|
|||
/** | |||
* Get object related | |||
* | |||
* @return string $object | |||
*/ | |||
public function getObject() | |||
{ | |||
return $this->object; | |||
} | |||
|
|||
/** | |||
* Set content | |||
* | |||
* @param string $content | |||
* @return AbstractPersonalTranslation | |||
*/ | |||
public function setContent($content) | |||
{ | |||
$this->content = $content; | |||
return $this; | |||
} | |||
|
|||
/** | |||
* Get content | |||
* | |||
* @return string $content | |||
*/ | |||
public function getContent() | |||
{ | |||
return $this->content; | |||
} | |||
} |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Oops, something went wrong.