lib/composer/ProductBundle/src/VisualMedia/ProductBundle/Entity/BaseAttribute.php line 28

Open in your IDE?
  1. <?php
  2. /**
  3. * Base Attribute
  4. *
  5. * @author Vincent van Waasbergen <v.vanwaasbergen@visualmedia.nl>
  6. */
  7. namespace VisualMedia\ProductBundle\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\ProductBundle\Model\BaseAttributeModel;
  14. use VisualMedia\OrderingBundle\Traits\OrderingTrait;
  15. /**
  16. * Base Attribute
  17. *
  18. * @ORM\Entity(repositoryClass="VisualMedia\ProductBundle\Manager\BaseAttributeManager")
  19. * @ORM\Table(name="attribute")
  20. *
  21. * @ORM\InheritanceType("SINGLE_TABLE")
  22. * @ORM\DiscriminatorColumn(name="discriminator", type="string")
  23. */
  24. class BaseAttribute extends BaseAttributeModel implements EntityInterface
  25. {
  26. use BlameableTrait;
  27. use AutoIdTrait;
  28. use OrderingTrait;
  29. use TimestampableTrait;
  30. /**
  31. * @ORM\Column(name="title", type="string", length=255, nullable=false)
  32. */
  33. public $title;
  34. /**
  35. * @ORM\Column(name="type", length=255, type="string", nullable=true)
  36. */
  37. public $type;
  38. /**
  39. * @ORM\OneToMany(targetEntity="VisualMedia\ProductBundle\Entity\BaseAttributeOption", mappedBy="attribute", cascade={"all"}, orphanRemoval=true)
  40. * @ORM\OrderBy({"title"="ASC"})
  41. */
  42. protected $options;
  43. /**
  44. * @ORM\Column(name="multiple", type="boolean", nullable=false)
  45. */
  46. public $multiple = false;
  47. /**
  48. * @ORM\Column(name="distinctive", type="boolean")
  49. */
  50. public $distinctive = false;
  51. /**
  52. * @ORM\Column(name="filterable", type="boolean", nullable=false)
  53. */
  54. public $filterable = false;
  55. /**
  56. * @ORM\Column(name="unit", type="string", length=32, nullable=true)
  57. */
  58. public $unit;
  59. /**
  60. * @ORM\Column(name="visible", type="boolean")
  61. */
  62. public $visible = true;
  63. /**
  64. * @ORM\Column(name="visible_in_category", type="boolean")
  65. */
  66. public $visibleInCategory = false;
  67. /**
  68. * @ORM\ManyToMany(targetEntity="VisualMedia\ProductBundle\Entity\BaseAttributeSet", mappedBy="attributes")
  69. */
  70. public $attributeSets;
  71. /**
  72. * @ORM\OneToMany(targetEntity="VisualMedia\ProductBundle\Entity\BaseAttributeContent", mappedBy="attribute")
  73. */
  74. public $attributes;
  75. /**
  76. * @ORM\Column(name="empty", type="string", length=32, nullable=true)
  77. */
  78. public $empty;
  79. }