Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?php
-
- namespace Lc\SovBundle\Doctrine\Extension;
-
- use Doctrine\ORM\Mapping as ORM;
- use Gedmo\Mapping\Annotation as Gedmo;
-
-
- trait SortableTrait
- {
- /**
- * @var string
- * @ORM\Column(type="float")
- */
- protected $position = 0;
-
- /**
- * @return float
- */
- public function getPosition(): float
- {
- return $this->position;
- }
-
- /**
- * @param float $position
- * @return $this
- */
- public function setPosition(float $position): self
- {
- $this->position = $position;
- return $this;
- }
-
- public function clearPosition(): self
- {
- $this->position = null;
- return $this;
- }
- }
|