Projekt

Obecné

Profil

Stáhnout (1.49 KB) Statistiky
| Větev: | Tag: | Revize:
1 56e8cf79 Jan Šedivý
<?php
2
3
namespace App\Enum;
4
5
6
class ESearchFormOperators
7
{
8
    const NOT_USED = '';
9
    const AND = 'and';
10
    const OR = 'or';
11
    const AND_NOT = 'and_not';
12
13
    const EQUALS = 'eq';
14
    const NOT_EQUALS = 'neq';
15
    const CONTAINS = 'con';
16
    const BEGINS_WITH = 'bw';
17
    const ENDS_WITH = 'ew';
18
19
    const IS = 'is';
20
    const IS_NOT = 'is_not';
21
22
23
    public static $wordSelectLabels = [
24
        self::NOT_USED => '- NOT USED -',
25
        self::AND => 'AND',
26
        self::OR => 'OR',
27
        self::AND_NOT => 'AND NOT'
28
    ];
29
30
    public static $wordWhereCondition = [
31
        self::AND => 'AND',
32
        self::OR => 'OR',
33
        self::AND_NOT => 'AND NOT'
34
    ];
35
36
37
    public static $selectLikeOperatorLabels = [
38 cddd4e21 Filip Jani
        self::EQUALS => 'equals',
39
        self::NOT_EQUALS => 'not equals',
40
        self::CONTAINS => 'contains',
41
        self::BEGINS_WITH => 'begins with',
42
        self::ENDS_WITH => 'ends with'
43 56e8cf79 Jan Šedivý
    ];
44
45
    public static $selectLikeOperatorQueryCondition = [
46
        self::EQUALS => ' = ? ',
47
        self::NOT_EQUALS => ' <> ? ',
48
        self::CONTAINS => ' LIKE ? ',
49
        self::BEGINS_WITH => ' LIKE ? ',
50
        self::ENDS_WITH => ' LIKE ? '
51
    ];
52
53
54
    public static $selectEqualsOperatorLabels = [
55 cddd4e21 Filip Jani
        self::IS => 'is',
56
        self::IS_NOT => 'is not'
57 56e8cf79 Jan Šedivý
    ];
58
59
    public static $selectEqualsOperatorQueryCondition = [
60
        self::IS => ' = ? ',
61
        self::IS_NOT => ' <> ? '
62
    ];
63 cddd4e21 Filip Jani
64
    public static $selectCatalogueLabels = [
65
        self::NOT_USED => '- NOT SELECTED -'
66
    ];
67 56e8cf79 Jan Šedivý
}