File manager - Edit - /home/jardides/www/Jardi-design/sitetest/components/com_hotspots/views/hotspots/view.html.php
Back
<?php /** * @package Hotspots * @author DanielDimitrov <daniel@compojoom.com> * @date 22.08.14 * * @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); /** * Class HotspotsViewHotspots * * @since 4.0 */ class HotspotsViewHotspots extends HotspotsView { /** * Display the map or user hotspots * * @param string $tpl - the template name * * @return mixed|void */ public function display($tpl = null) { if (JFactory::getApplication()->input->getCmd('layout') == 'userhotspots') { $this->setLayout('userhotspots'); $this->userHotspots(); return; } $this->_prepareDocument(); parent::display($tpl); } /** * Prepare the user hotspots * * @param string $tpl - the template to use * * @return void */ public function userHotspots($tpl = null) { $this->user = JFactory::getUser(); $model = JModelLegacy::getInstance('Hotspot', 'HotspotsModel'); $hotspots = $model->getUserHotspots($this->user->id); foreach ($hotspots as $key => $hotspot) { $urlcat = $hotspot->catid . ':' . JFilterOutput::stringURLSafe($hotspot->cat_name); $urlid = $hotspot->id . ':' . JFilterOutput::stringURLSafe($hotspot->name); $hotspots[$key]->link = JRoute::_(HotspotsHelperRoute::getHotspotRoute($urlid, $urlcat)); } $this->hotspots = $hotspots; parent::display($tpl); } /** * Prepares the document * * @return void */ protected function _prepareDocument() { $menu = JFactory::getApplication()->getMenu()->getActive(); $params = $menu->params; $document = JFactory::getDocument(); if ($params->get('menu-meta_description')) { $document->setDescription($params->get('menu-meta_description')); } if ($params->get('menu-meta_keywords')) { $document->setMetadata('keywords', $params->get('menu-meta_keywords')); } if ($params->get('robots')) { $document->setMetadata('robots', $params->get('robots')); } } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings