Sortable.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace Gedmo\Sortable;
  3. /**
  4. * This interface is not necessary but can be implemented for
  5. * Entities which in some cases needs to be identified as
  6. * Sortable
  7. *
  8. * @author Lukas Botsch <lukas.botsch@gmail.com>
  9. * @package Gedmo.Sortable
  10. * @subpackage Sortable
  11. * @link http://www.gediminasm.org
  12. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  13. */
  14. interface Sortable
  15. {
  16. // use now annotations instead of predifined methods, this interface is not necessary
  17. /**
  18. * @gedmo:SortablePosition - to mark property which will hold the item position use annotation @gedmo:SortablePosition
  19. * This property has to be numeric. The position index can be negative and will be counted from right to left.
  20. *
  21. * example:
  22. *
  23. * @gedmo:SortablePosition
  24. * @Column(type="int")
  25. * $position
  26. *
  27. * @gedmo:SortableGroup
  28. * @Column(type="string", length=64)
  29. * $category
  30. *
  31. */
  32. /**
  33. * @gedmo:SortableGroup - to group node sorting by a property use annotation @gedmo:SortableGroup on this property
  34. *
  35. * example:
  36. *
  37. * @gedmo:SortableGroup
  38. * @Column(type="string", length=64)
  39. * $category
  40. */
  41. }