| 1 |
<?php |
| 2 |
namespace HelloPlus\Modules\Forms\Controls; |
| 3 |
|
| 4 |
use Elementor\Control_Repeater; |
| 5 |
use Elementor\Controls_Manager; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; // Exit if accessed directly |
| 9 |
} |
| 10 |
|
| 11 |
/** |
| 12 |
* Class Fields_Map |
| 13 |
* @package HelloPlus\Modules\Forms\Controls |
| 14 |
* |
| 15 |
* each item needs the following properties: |
| 16 |
* remote_id, |
| 17 |
* remote_label |
| 18 |
* remote_type |
| 19 |
* remote_required |
| 20 |
* local_id |
| 21 |
*/ |
| 22 |
class Fields_Map extends Control_Repeater { |
| 23 |
|
| 24 |
const CONTROL_TYPE = 'fields_map'; |
| 25 |
|
| 26 |
public function get_type() { |
| 27 |
return self::CONTROL_TYPE; |
| 28 |
} |
| 29 |
|
| 30 |
protected function get_default_settings() { |
| 31 |
return array_merge( parent::get_default_settings(), [ |
| 32 |
'render_type' => 'none', |
| 33 |
'fields' => [ |
| 34 |
[ |
| 35 |
'name' => 'remote_id', |
| 36 |
'type' => Controls_Manager::HIDDEN, |
| 37 |
], |
| 38 |
[ |
| 39 |
'name' => 'local_id', |
| 40 |
'type' => Controls_Manager::SELECT, |
| 41 |
], |
| 42 |
], |
| 43 |
] ); |
| 44 |
} |
| 45 |
} |
| 46 |
|