1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* webtrees-lib: MyArtJaub library for webtrees |
4
|
|
|
* |
5
|
|
|
* @package MyArtJaub\Webtrees |
6
|
|
|
* @subpackage GeoDispersion |
7
|
|
|
* @author Jonathan Jaubart <[email protected]> |
8
|
|
|
* @copyright Copyright (c) 2009-2016, Jonathan Jaubart |
9
|
|
|
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 |
10
|
|
|
*/ |
11
|
|
|
namespace MyArtJaub\Webtrees\Module\GeoDispersion\Model; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class holding options for displaying GeoAnalysis. |
15
|
|
|
*/ |
16
|
|
|
class GeoDisplayOptions { |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Outline map to be used for diaplay |
20
|
|
|
* @var (null|OutlineMap) $map |
21
|
|
|
*/ |
22
|
|
|
protected $map; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Level in the Gedcom hierarchy of the parent level of the outline map. |
26
|
|
|
* @var int $map_level |
27
|
|
|
*/ |
28
|
|
|
protected $map_level; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Option to use flags in places display, instead of or in addition to the name. |
32
|
|
|
* @var bool $use_flags |
33
|
|
|
*/ |
34
|
|
|
protected $use_flags; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Option to define the number of top places to display in the generation view. |
38
|
|
|
* @var int $max_details_in_gen |
39
|
|
|
*/ |
40
|
|
|
protected $max_details_in_gen; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Get the outline map to use for display. |
44
|
|
|
* |
45
|
|
|
* @return (OutlineMap|null) |
46
|
|
|
*/ |
47
|
|
|
public function getMap(){ |
48
|
|
|
return $this->map; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Set the outline map to use for display. |
53
|
|
|
* |
54
|
|
|
* @param (OutlineMap|null) $map |
55
|
|
|
* @return self Enable method-chaining |
56
|
|
|
*/ |
57
|
|
|
public function setMap(OutlineMap $map = null) { |
58
|
|
|
$this->map = $map; |
59
|
|
|
return $this; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Get the level of the map parent place |
64
|
|
|
* |
65
|
|
|
* @return int |
66
|
|
|
*/ |
67
|
|
|
public function getMapLevel(){ |
68
|
|
|
return $this->map_level; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* Set the level of the map parent place |
73
|
|
|
* |
74
|
|
|
* @param int $maplevel |
75
|
|
|
* @return self Enable method-chaining |
76
|
|
|
*/ |
77
|
|
|
public function setMapLevel($maplevel) { |
78
|
|
|
$this->map_level = $maplevel; |
79
|
|
|
return $this; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Get whether flags should be used in places display |
84
|
|
|
* |
85
|
|
|
* @return bool |
86
|
|
|
*/ |
87
|
|
|
public function isUsingFlags(){ |
88
|
|
|
return $this->use_flags; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* Set whether flags should be used in places display |
93
|
|
|
* |
94
|
|
|
* @param bool $use_flags |
95
|
|
|
* @return self Enable method-chaining |
96
|
|
|
*/ |
97
|
|
|
public function setUsingFlags($use_flags) { |
98
|
|
|
$this->use_flags = $use_flags; |
99
|
|
|
return $this; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* Get the number of Top Places in the generation view |
104
|
|
|
* |
105
|
|
|
* @return int |
106
|
|
|
*/ |
107
|
|
|
public function getMaxDetailsInGen(){ |
108
|
|
|
return $this->max_details_in_gen; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* Set the number of Top Places in the generation view |
113
|
|
|
* |
114
|
|
|
* @param int $max_details_in_gen |
115
|
|
|
* @return self Enable method-chaining |
116
|
|
|
*/ |
117
|
|
|
public function setMaxDetailsInGen($max_details_in_gen) { |
118
|
|
|
$this->max_details_in_gen = $max_details_in_gen; |
119
|
|
|
return $this; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
} |
123
|
|
|
|