Your IP : 216.73.216.240
<?php
/*------------------------------------------------------------------------
# com_zhgooglemap - Zh GoogleMap
# ------------------------------------------------------------------------
# author: Dmitry Zhuk
# copyright: Copyright (C) 2011 zhuk.cc. All Rights Reserved.
# license: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
# website: http://zhuk.cc
# Technical Support Forum: http://forum.zhuk.cc/
-------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import Joomla view library
jimport('joomla.application.component.view');
/**
* View class for the ZhGoogle MapBufmrks Component
*/
class ZhGoogleMapViewMapBufmrklogs extends JViewLegacy
{
protected $state;
protected $items;
protected $pagination;
// Overwriting JView display method
function display($tpl = null)
{
// Get data from the model
$this->state = $this->get('State');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
// $this->assoc = $this->get('Assoc');
//$this->filterForm = $this->get('FilterForm');
//$this->activeFilters = $this->get('ActiveFilters');
ZhGoogleMapHelper::addSubmenu('mapbufmrklogs');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode('<br />', $errors));
return false;
}
// Set the toolbar
$this->addToolBar();
// Display the template
parent::display($tpl);
// Set the document
$this->setDocument();
}
/**
* Setting the toolbar
*/
protected function addToolBar()
{
$canDo = ZhGoogleMapHelper::getBufmrkActions();
JToolBarHelper::title(JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKLOGS_MANAGER'), 'mapbufmrklog');
JToolBarHelper::custom('mapbufmrklogs.back', 'exit.png', 'exit.png', JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_BUTTON_CLOSE'), false);
JHtmlSidebar::setAction('index.php?option=com_zhgooglemap');
$this->sidebar = JHtmlSidebar::render();
}
/**
* Method to set up the document properties
*
* @return void
*/
protected function setDocument()
{
$document = JFactory::getDocument();
$document->setTitle(JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKLOGS_ADMINISTRATION'));
}
/**
* Returns an array of fields the table can be sorted by
*
* @return array Array containing the field name to sort by as the key and display text as value
*
* @since 3.0
*/
protected function getSortFields()
{
return array(
'h.id' => JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_LOG_IMPORT_ID'),
'h.kind' => JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_LOG_IMPORT_OBJECT'),
'h.title' => JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_LOG_IMPORT_ERROR')
);
}
}