-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParameters.php
More file actions
69 lines (61 loc) · 1.66 KB
/
Parameters.php
File metadata and controls
69 lines (61 loc) · 1.66 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/*
* This file is part of the Gesdinet vbApp package.
*
* (c) Gesdinet <contact@Gesdinet.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gesdinet\InfiniteScrollBundle;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Sent parameters from InfiniteScroll plugin.
*
* @property int $start Index of first row to return, zero-based.
* @property int $length Total number of rows to return (-1 to return all rows).
* @property string $search Global search value.
* @property array $order Columns ordering (zero-based column index and direction).
* @property array $customData Custom data from DataTables.
*/
class Parameters
{
/**
* @Assert\NotNull
* @Assert\GreaterThanOrEqual(value="0")
*/
public $start = 0;
/**
* @Assert\NotNull
* @Assert\GreaterThanOrEqual(value="-1")
*/
public $length = -1;
/**
* @Assert\NotNull
* @Assert\Length(max="100")
*/
public $search = '';
/**
* @Assert\NotNull
* @Assert\Type(type="array")
* @Assert\All({
* @Assert\Collection(
* fields={
* "field" = {
* @Assert\Length(max="100")
* },
* "sort" = {
* @Assert\Choice(choices={"asc", "desc"}, strict=true)
* }
* },
* allowExtraFields=false,
* allowMissingFields=false
* )
* })
*/
public $order = [];
/**
* @Assert\Type(type="array")
*/
public $customData = [];
}