12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace Sluggable\Fixture\Document;
- use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
- use Gedmo\Mapping\Annotation as Gedmo;
- /**
- * @ODM\Document(collection="articles")
- */
- class Article
- {
- /** @ODM\Id */
- private $id;
- /**
- * @ODM\String
- */
- private $title;
- /**
- * @ODM\String
- */
- private $code;
- /**
- * @Gedmo\Slug(handlers={
- * @Gedmo\SlugHandler(class="Gedmo\Sluggable\Handler\InversedRelativeSlugHandler", options={
- * @Gedmo\SlugHandlerOption(name="relationClass", value="Sluggable\Fixture\Document\RelativeSlug"),
- * @Gedmo\SlugHandlerOption(name="mappedBy", value="article"),
- * @Gedmo\SlugHandlerOption(name="inverseSlugField", value="alias")
- * })
- * }, separator="-", updatable=true, fields={"title", "code"})
- * @ODM\String
- */
- private $slug;
- public function getId()
- {
- return $this->id;
- }
- public function setTitle($title)
- {
- $this->title = $title;
- }
- public function getTitle()
- {
- return $this->title;
- }
- public function setCode($code)
- {
- $this->code = $code;
- }
- public function getCode()
- {
- return $this->code;
- }
- public function getSlug()
- {
- return $this->slug;
- }
- }
|