lib/composer/RoutingBundle/src/VisualMedia/RoutingBundle/Entity/BaseRedirect.php line 27

Open in your IDE?
  1. <?php
  2. /**
  3. * Base Redirect
  4. *
  5. * @author Vincent van Waasbergen <v.vanwaasbergen@visualmedia.nl>
  6. */
  7. namespace VisualMedia\RoutingBundle\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use VisualMedia\LisaBundle\Component\Interfaces\EntityInterface;
  10. use VisualMedia\LisaBundle\Traits\BlameableTrait;
  11. use VisualMedia\LisaBundle\Traits\AutoIdTrait;
  12. use VisualMedia\LisaBundle\Traits\TimestampableTrait;
  13. use VisualMedia\RoutingBundle\Model\BaseRedirectModel;
  14. /**
  15. * Base Redirect
  16. *
  17. * @ORM\Entity(repositoryClass="VisualMedia\RoutingBundle\Manager\BaseRedirectManager")
  18. * @ORM\Table(name="redirect", indexes={ @ORM\Index(name="route_search_index", columns={ "url_from", "url_to" }) })
  19. *
  20. * @ORM\InheritanceType("SINGLE_TABLE")
  21. * @ORM\DiscriminatorColumn(name="discriminator", type="string")
  22. */
  23. class BaseRedirect extends BaseRedirectModel implements EntityInterface
  24. {
  25. use BlameableTrait;
  26. use AutoIdTrait;
  27. use TimestampableTrait;
  28. /**
  29. * @ORM\Column(name="type", type="integer", length=11, nullable=false)
  30. */
  31. public $type = 301;
  32. /**
  33. * @ORM\Column(name="url_from", type="string", length=128, nullable=false)
  34. */
  35. public $urlFrom;
  36. /**
  37. * @ORM\Column(name="url_to", type="string", length=128, nullable=false)
  38. */
  39. public $urlTo;
  40. /**
  41. * @ORM\Column(name="active", type="boolean", nullable=false, options={ "default": 1 })
  42. */
  43. public $active = true;
  44. /**
  45. * @ORM\Column(name="auto_generated", type="boolean", nullable=false, options={ "default": 0 })
  46. */
  47. public $autoGenerated = false;
  48. /**
  49. * @ORM\ManyToOne(targetEntity="VisualMedia\TranslationBundle\Entity\BaseChannel")
  50. * @ORM\JoinColumn(name="channel_id", referencedColumnName="id", onDelete="CASCADE")
  51. */
  52. public $channel;
  53. /**
  54. * @ORM\ManyToOne(targetEntity="VisualMedia\TranslationBundle\Entity\BaseLocale")
  55. * @ORM\JoinColumn(name="locale_id", referencedColumnName="id", onDelete="CASCADE")
  56. */
  57. public $locale;
  58. }