|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* File holding the FooterPlaces class |
|
4
|
|
|
* |
|
5
|
|
|
* This file is part of the MediaWiki skin Chameleon. |
|
6
|
|
|
* |
|
7
|
|
|
* @copyright 2013 - 2014, Stephan Gambke |
|
8
|
|
|
* @license GNU General Public License, version 3 (or any later version) |
|
9
|
|
|
* |
|
10
|
|
|
* The Chameleon skin is free software: you can redistribute it and/or modify |
|
11
|
|
|
* it under the terms of the GNU General Public License as published by the Free |
|
12
|
|
|
* Software Foundation, either version 3 of the License, or (at your option) any |
|
13
|
|
|
* later version. |
|
14
|
|
|
* |
|
15
|
|
|
* The Chameleon skin is distributed in the hope that it will be useful, but |
|
16
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
17
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
18
|
|
|
* details. |
|
19
|
|
|
* |
|
20
|
|
|
* You should have received a copy of the GNU General Public License along |
|
21
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>. |
|
22
|
|
|
* |
|
23
|
|
|
* @file |
|
24
|
|
|
* @ingroup Skins |
|
25
|
|
|
*/ |
|
26
|
|
|
|
|
27
|
|
|
namespace Skins\Chameleon\Components; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* The FooterInfo class. |
|
31
|
|
|
* |
|
32
|
|
|
* A inline list containing links to places (about, privacy policy, and disclaimer links): <ul id="footer-places"> |
|
33
|
|
|
* |
|
34
|
|
|
* @author Stephan Gambke |
|
35
|
|
|
* @since 1.0 |
|
36
|
|
|
* @ingroup Skins |
|
37
|
|
|
*/ |
|
38
|
|
|
class FooterPlaces extends Component { |
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* Builds the HTML code for this component |
|
42
|
|
|
* |
|
43
|
|
|
* @return String the HTML code |
|
44
|
|
|
*/ |
|
45
|
7 |
|
public function getHtml() { |
|
46
|
|
|
|
|
47
|
7 |
|
$ret = null; |
|
48
|
7 |
|
$footerlinks = $this->getSkinTemplate()->getFooterLinks(); |
|
49
|
|
|
|
|
50
|
7 |
|
if ( array_key_exists( 'places', $footerlinks ) ) { |
|
51
|
|
|
|
|
52
|
7 |
|
$ret = $this->indent() . '<!-- places -->' . |
|
53
|
7 |
|
$this->indent() . '<ul class="list-inline footer-places ' . $this->getClassString() . '" id="footer-places">'; |
|
54
|
|
|
|
|
55
|
7 |
|
$this->indent( 1 ); |
|
56
|
7 |
|
foreach ( $footerlinks[ 'places' ] as $key ) { |
|
57
|
7 |
|
$ret .= $this->indent() . '<li><small>' . $this->getSkinTemplate()->get( $key ) . '</small></li>'; |
|
58
|
7 |
|
} |
|
59
|
7 |
|
$ret .= $this->indent( -1 ) . '</ul>' . "\n"; |
|
60
|
7 |
|
} |
|
61
|
|
|
|
|
62
|
7 |
|
return $ret; |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|