/aamenu/code/trunk/administrator/components/com_aamenu/views/aamenu/view.html.php
PHP | 67 lines | 31 code | 9 blank | 27 comment | 1 complexity | ef005c1c9dd5f25f1a835afcb1041962 MD5 | raw file
- <?php
- /**
- * @version $Id: view.html.php 269 2010-09-01 00:23:48Z eddieajau $
- * @copyright Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
- * @link http://www.theartofjoomla.com
- */
- // no direct access
- defined('_JEXEC') or die;
- jimport('joomla.application.component.view');
- /**
- * @package Artof.AAMenu
- * @subpackage com_aamenu
- */
- class AAMenuViewAAMenu extends JView
- {
- public $state;
- public $items;
- public $tags;
- public $pagination;
- /**
- * Display the main view.
- *
- * @param string $tpl The template file to display.
- *
- * @return void
- * @since 1.0.0
- */
- public function display($tpl = null)
- {
- $this->state = $this->get('State');
- $this->items = $this->get('Items');
- $this->tags = $this->get('Tags');
- $this->pagination = $this->get('Pagination');
- // Check for errors.
- if (count($errors = $this->get('Errors'))) {
- JError::raiseError(500, implode("\n", $errors));
- return false;
- }
- $this->setToolbar();
- parent::display($tpl);
- }
- /**
- * Add the toolbar controls.
- *
- * @return void
- * @since 1.0.3
- */
- function setToolbar()
- {
- JToolBarHelper::title(JText::_('COM_AAMENU_TITLE'), 'logo');
- JToolBarHelper::save('tags.save', 'COM_AAMENU_Toolbar_Save_Changes');
- JToolBarHelper::preferences('com_aamenu', 360, 600, 'COM_AAMENU_TOOLBAR_OPTIONS');
- // We can't use the toolbar helper here because there is no generic popup button.
- JToolBar::getInstance('toolbar')
- ->appendButton('Popup', 'help', 'COM_AAMENU_TOOLBAR_ABOUT', 'index.php?option=com_aamenu&view=about&tmpl=component');
- }
- }