-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathParameters.php
More file actions
71 lines (63 loc) · 1.74 KB
/
Parameters.php
File metadata and controls
71 lines (63 loc) · 1.74 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
70
71
<?php
/*
* This file is part of the Gesdinet MetronicDataTableBundle package.
*
* (c) Gesdinet <marcos@gesdinet.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gesdinet\MetronicDataTableBundle;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Sent parameters from DataTables plugin.
*
* @see https://keenthemes.com/metronic/documentation.html#sec14
*
* @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 = [];
}