PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
jc-importer / class / Common / AddonAPI / Exporter / GroupData.php

GroupData.php in Import WP – CSV & XML Import Export for WordPress 2.15.0, at class/Common/AddonAPI/Exporter/GroupData.php

38 lines 685 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ImportWP\Common\AddonAPI\Exporter;
4
5 class GroupData
6 {
7 private $_id;
8
9 /**
10 * @var FieldData[]
11 */
12 private $_fields = [];
13
14 public function __construct($id, $fields = [])
15 {
16 $this->_id = $id;
17
18
19 foreach ($fields as $field_id => $value) {
20 $this->_fields[$field_id] = new FieldData($field_id, $value);
21 }
22 }
23
24 public function get_field($field_id)
25 {
26 if (!isset($this->_fields[$field_id])) {
27 $this->_fields[$field_id] = new FieldData($field_id);
28 }
29
30 return $this->_fields[$field_id];
31 }
32
33 public function get_fields()
34 {
35 return $this->_fields;
36 }
37 }
38