src/Eccube/Entity/BlockPosition.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of EC-CUBE
  4. *
  5. * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6. *
  7. * http://www.ec-cube.co.jp/
  8. *
  9. * For the full copyright and license information, please view the LICENSE
  10. * file that was distributed with this source code.
  11. */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists('\Eccube\Entity\BlockPosition')) {
  15. /**
  16. * BlockPosition
  17. *
  18. * @ORM\Table(name="dtb_block_position")
  19. * @ORM\InheritanceType("SINGLE_TABLE")
  20. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21. * @ORM\HasLifecycleCallbacks()
  22. * @ORM\Entity(repositoryClass="Eccube\Repository\BlockPositionRepository")
  23. */
  24. class BlockPosition extends \Eccube\Entity\AbstractEntity
  25. {
  26. /**
  27. * @var int
  28. *
  29. * @ORM\Column(name="section", type="integer", options={"unsigned":true})
  30. * @ORM\Id
  31. * @ORM\GeneratedValue(strategy="NONE")
  32. */
  33. private $section;
  34. /**
  35. * @var int
  36. *
  37. * @ORM\Column(name="block_id", type="integer", options={"unsigned":true})
  38. * @ORM\Id
  39. * @ORM\GeneratedValue(strategy="NONE")
  40. */
  41. private $block_id;
  42. /**
  43. * @var int
  44. *
  45. * @ORM\Column(name="layout_id", type="integer", options={"unsigned":true})
  46. * @ORM\Id
  47. * @ORM\GeneratedValue(strategy="NONE")
  48. */
  49. private $layout_id;
  50. /**
  51. * @var int|null
  52. *
  53. * @ORM\Column(name="block_row", type="integer", nullable=true, options={"unsigned":true})
  54. */
  55. private $block_row;
  56. /**
  57. * @var \Eccube\Entity\Block
  58. *
  59. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Block", inversedBy="BlockPositions")
  60. * @ORM\JoinColumns({
  61. * @ORM\JoinColumn(name="block_id", referencedColumnName="id")
  62. * })
  63. */
  64. private $Block;
  65. /**
  66. * @var \Eccube\Entity\Layout
  67. *
  68. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Layout", inversedBy="BlockPositions")
  69. * @ORM\JoinColumns({
  70. * @ORM\JoinColumn(name="layout_id", referencedColumnName="id")
  71. * })
  72. */
  73. private $Layout;
  74. /**
  75. * Set section.
  76. *
  77. * @param int $section
  78. *
  79. * @return BlockPosition
  80. */
  81. public function setSection($section)
  82. {
  83. $this->section = $section;
  84. return $this;
  85. }
  86. /**
  87. * Get section.
  88. *
  89. * @return int
  90. */
  91. public function getSection()
  92. {
  93. return $this->section;
  94. }
  95. /**
  96. * Set blockId.
  97. *
  98. * @param int $blockId
  99. *
  100. * @return BlockPosition
  101. */
  102. public function setBlockId($blockId)
  103. {
  104. $this->block_id = $blockId;
  105. return $this;
  106. }
  107. /**
  108. * Get blockId.
  109. *
  110. * @return int
  111. */
  112. public function getBlockId()
  113. {
  114. return $this->block_id;
  115. }
  116. /**
  117. * Set layoutId.
  118. *
  119. * @param int $layoutId
  120. *
  121. * @return BlockPosition
  122. */
  123. public function setLayoutId($layoutId)
  124. {
  125. $this->layout_id = $layoutId;
  126. return $this;
  127. }
  128. /**
  129. * Get layoutId.
  130. *
  131. * @return int
  132. */
  133. public function getLayoutId()
  134. {
  135. return $this->layout_id;
  136. }
  137. /**
  138. * Set blockRow.
  139. *
  140. * @param int|null $blockRow
  141. *
  142. * @return BlockPosition
  143. */
  144. public function setBlockRow($blockRow = null)
  145. {
  146. $this->block_row = $blockRow;
  147. return $this;
  148. }
  149. /**
  150. * Get blockRow.
  151. *
  152. * @return int|null
  153. */
  154. public function getBlockRow()
  155. {
  156. return $this->block_row;
  157. }
  158. /**
  159. * Set block.
  160. *
  161. * @param \Eccube\Entity\Block|null $block
  162. *
  163. * @return BlockPosition
  164. */
  165. public function setBlock(Block $block = null)
  166. {
  167. $this->Block = $block;
  168. return $this;
  169. }
  170. /**
  171. * Get block.
  172. *
  173. * @return \Eccube\Entity\Block|null
  174. */
  175. public function getBlock()
  176. {
  177. return $this->Block;
  178. }
  179. /**
  180. * Set layout.
  181. *
  182. * @param \Eccube\Entity\Layout|null $Layout
  183. *
  184. * @return BlockPosition
  185. */
  186. public function setLayout(Layout $Layout = null)
  187. {
  188. $this->Layout = $Layout;
  189. return $this;
  190. }
  191. /**
  192. * Get Layout.
  193. *
  194. * @return \Eccube\Entity\Layout|null
  195. */
  196. public function getLayout()
  197. {
  198. return $this->Layout;
  199. }
  200. }
  201. }