?? view.html.php
字號:
<?php/** * Hello View for Hello World Component * * @package Joomla.Tutorials * @subpackage Components * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_4 * @license GNU/GPL */// No direct accessdefined( '_JEXEC' ) or die( 'Restricted access' );jimport( 'joomla.application.component.view' );/** * Hello View * * @package Joomla.Tutorials * @subpackage Components */class HellosViewHello extends JView{ /** * display method of Hello view * @return void **/ function display($tpl = null) { //get the hello $hello =& $this->get('Data'); $isNew = ($hello->id < 1); $text = $isNew ? JText::_( 'New' ) : JText::_( 'Edit' ); JToolBarHelper::title( JText::_( 'Hello' ).': <small><small>[ ' . $text.' ]</small></small>' ); JToolBarHelper::save(); if ($isNew) { JToolBarHelper::cancel(); } else { // for existing items the button is renamed `close` JToolBarHelper::cancel( 'cancel', 'Close' ); } $this->assignRef('hello', $hello); parent::display($tpl); }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -