Passed
Push — master ( 12ba88...25e691 )
by Stefan
08:44
created

MapNone::htmlShowtime()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 2
1
<?php
2
3
/*
4
 * ******************************************************************************
5
 * Copyright 2011-2017 DANTE Ltd. and GÉANT on behalf of the GN3, GN3+, GN4-1 
6
 * and GN4-2 consortia
7
 *
8
 * License: see the web/copyright.php file in the file structure
9
 * ******************************************************************************
10
 */
11
12
namespace web\lib\admin;
13
14
require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php");
15
16
/**
17
 * This class provides map display functionality
18
 * 
19
 * @author Stefan Winter <[email protected]>
20
 */
21
class MapNone extends AbstractMap {
22
23
    public function __construct($inst, $readonly) {
24
        parent::__construct($inst, $readonly);
25
        return $this;
26
    }
27
28
    public function htmlHeadCode() {
29
        // no magic required if you want to nothing at all.
30
        return "";
31
    }
32
33
    public function htmlBodyCode() {
34
        // no magic required if you want to nothing at all.
35
        return "";
36
    }
37
38
    public function htmlShowtime($wizard = FALSE, $additional = FALSE) {
39
        if (!$this->readOnly) {
40
            return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE);
41
        }
42
    }
43
44
    public function bodyTagCode() {
45
        return "";
46
    }
47
48
    public static function optionListDisplayCode($coords, $number) {
49
        $pair = json_decode($coords, true);
50
        return "<table><tr><td>Latitude</td><td><strong>" . $pair['lat'] . "</strong></td></tr><tr><td>Longitude</td><td><strong>" . $pair['lon'] . "</strong></td></tr></table>";
51
    }
52
}
53