-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin_fields.php
62 lines (52 loc) · 1.78 KB
/
plugin_fields.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
$Fields2 = array(
'make' => array(
'label' => __('Make'),
'rule' => 'required|between:3,10|alpha_dash',
'filter' => 'sanitize_string',
'search' => 'true'
),
'model' => array(
'label' => __('Model'),
'rule' => 'required|between:3,10|',
'filter' => 'sanitize_string'
),
'gears' => array(
'label' => __('Gears'),
'rule' => 'required|numeric',
'type' => 'select',
'options' =>'1,2,3,4,5,6'
)
);
$Fields3 = array(
'rooms' => array(
'rule' => 'required|between:1,3|integer',
'filter' => 'sanitize_numbers',
'search' => 'true'
),
'bathrooms' => array(
'rule' => 'required|between:1,3|integer',
'filter' => 'sanitize_numbers'
),
'year' => array(
'rule' => 'required|integer',
'type' => 'select',
'options' =>'1,2,3,4,5,6'
)
);
dd($Fields2);
dd("PluginFields::newInstance()->setFields('item','\$Fields2','cars_attributes')");
PluginFields::newInstance()->setFields('item',$Fields2,'cars_attributes');
PluginFields::newInstance()->setFields('item',$Fields3,'real_estate');
dd("PluginFields::newInstance()->getFields('item')");
dd(PluginFields::newInstance()->getFields('item'));
dd("PluginFields::newInstance()->getField('item','gears')");
dd(PluginFields::newInstance()->getField('item','gears'));
dd("PluginFields::newInstance()->getRequired('item')");
dd(PluginFields::newInstance()->getRequired('item'));
dd("PluginFields::newInstance()->getSearch()");
dd(PluginFields::newInstance()->getSearch());
dd("PluginFields::newInstance()->getPlugins()");
dd(PluginFields::newInstance()->getPlugins());
dd("PluginFields::newInstance()->getPlugin('cars_attributes')");
dd(PluginFields::newInstance()->getPlugin('cars_attributes'));