view.raw.php
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
// namespace administrator\components\com_jmap\views\pingomatic;
/**
* @author Joomla! Extensions Store
* @package JMAP::PINGOMATIC::administrator::components::com_jmap
* @subpackage views
* @subpackage pingomatic
* @copyright (C)2015 Joomla! Extensions Store
* @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
*/
defined ( '_JEXEC' ) or die ( 'Restricted access' );
/**
* Config view
*
* @package JMAP::PINGOMATIC::administrator::components::com_jmap
* @subpackage views
* @subpackage pingomatic
* @since 1.0
*/
class JMapViewPingomatic extends JMapView {
/**
* Render object/embed element for stats data
*
* @access public
* @param string $tpl
* @return void
*/
public function display($tpl = null) {
// Fetch data from Pingomatic remote server from model
$this->pingomaticStats = $this->getModel()->getPingomaticStats($this->get('httpclient'));
if(!$this->pingomaticStats) {
$this->pingomaticStats = JText::_('COM_JMAP_IMPOSSIBLE_FETCH_PINGOMATIC_STATS');
}
// Display stats object
echo $this->pingomaticStats;
}
}