forked from doctrine-extensions/DoctrineExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sortable.php
48 lines (43 loc) · 1.32 KB
/
Sortable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/*
* This file is part of the Doctrine Behavioral Extensions package.
* (c) Gediminas Morkevicius <[email protected]> http://www.gediminasm.org
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gedmo\Sortable;
/**
* This interface is not necessary but can be implemented for
* Entities which in some cases needs to be identified as
* Sortable
*
* @author Lukas Botsch <[email protected]>
*/
interface Sortable
{
// use now annotations instead of predefined methods, this interface is not necessary
/*
* @gedmo:SortablePosition - to mark property which will hold the item position use annotation @gedmo:SortablePosition
* This property has to be numeric. The position index can be negative and will be counted from right to left.
*
* example:
*
* @gedmo:SortablePosition
* @Column(type="int")
* $position
*
* @gedmo:SortableGroup
* @Column(type="string", length=64)
* $category
*
*/
/*
* @gedmo:SortableGroup - to group node sorting by a property use annotation @gedmo:SortableGroup on this property
*
* example:
*
* @gedmo:SortableGroup
* @Column(type="string", length=64)
* $category
*/
}