Passed
Pull Request — 2.x (#1360)
by Harings
11:27
created

Map   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 1
A render() 0 3 1
1
<?php
2
3
namespace A17\Twill\View\Components;
4
5
class Map extends TwillFormComponent
6
{
7
    public $showMap;
8
    public $openMap;
9
    public $inModal;
10
    public $saveExtendedData;
11
    public $autoDetectLatLngValue;
12
13
    public function __construct(
14
        $name,
15
        $label,
16
        $showMap = true,
17
        $openMap = false,
18
        $fieldsInModal = false,
19
        $saveExtendedData = false,
20
        $autoDetectLatLngValue = false
21
    ) {
22
        parent::__construct($name, $label);
23
        $this->showMap = $showMap;
24
        $this->openMap = $openMap;
25
        $this->inModal = $fieldsInModal ?? false;
26
        $this->saveExtendedData = $saveExtendedData;
27
        $this->autoDetectLatLngValue = $autoDetectLatLngValue;
28
    }
29
30
    public function render()
31
    {
32
        return view('twill::partials.form._map');
33
    }
34
}
35