-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
54 lines (53 loc) · 1.53 KB
/
code.power
File metadata and controls
54 lines (53 loc) · 1.53 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
/**
* Get a subform items
*
* @param array $getMap The the map to get the subfrom data
*
* Example:
* $getMap = [
* '_core' => [
* 'table' =>'data',
* 'linkValue' => $item->guid ?? '',
* 'linkKey' => 'look',
* 'field' => 'data',
* 'get' => ['guid','email','image','mobile_phone','website','dateofbirth']
* ],
* 'countries' => [
* 'table' =>'data_country',
* 'linkValue' => 'data:guid', // coretable:fieldname
* 'linkKey' => 'data',
* 'get' => ['guid','country','currency']
* ]
* ];
*
* @return array|null The subform
* @since 3.2.2
*/
public function get(array $getMap): ?array;
/**
* Set a subform items
*
* @param mixed $items The list of items from the subform to set
* @param array $setMap The the map to set the subfrom data
*
* Example:
* $items,
* $setMap = [
* '_core' => [
* 'table' =>'data',
* 'indexKey' => 'guid',
* 'linkKey' => 'look',
* 'linkValue' => $data['guid'] ?? ''
* ],
* 'countries' => [
* 'table' =>'data_country',
* 'indexKey' => 'guid',
* 'linkKey' => 'data',
* 'linkValue' => 'data:guid' // coretable:fieldname
* ]
* ];
*
* @return bool
* @since 3.2.2
*/
public function set(mixed $items, array $setMap): bool;