libs/Yii/web/widgets/CTabView.php
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* CTabView class file.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright Copyright © 2008-2011 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
/**
* CTabView displays contents in multiple tabs.
*
* At any time, only one tab is visible. Users can click on the tab header
* to switch to see another tab of content.
*
* JavaScript is used to control the tab switching. If JavaScript is disabled,
* CTabView still manages to display the content in a semantically appropriate way.
*
* To specify contents and their tab structure, configure the {@link tabs} property.
* The {@link tabs} property takes an array with tab ID being mapped tab definition.
* Each tab definition is an array of the following structure:
* <ul>
* <li>title: the tab title.</li>
* <li>content: the content to be displayed in the tab.</li>
* <li>view: the name of the view to be displayed in this tab.
* The view will be rendered using the current controller's
* {@link CController::renderPartial} method.
* When both 'content' and 'view' are specified, 'content' will take precedence.
* </li>
* <li>url: a URL that the user browser will be redirected to when clicking on this tab.</li>
* <li>data: array (name=>value), this will be passed to the view when 'view' is specified.</li>
* </ul>
*
* For example, the {@link tabs} property can be configured as follows,
* <pre>
* $this->widget('CTabView', array(
* 'tabs'=>array(
* 'tab1'=>array(
* 'title'=>'tab 1 title',
* 'view'=>'view1',
* 'data'=>array('model'=>$model),
* ),
* 'tab2'=>array(
* 'title'=>'tab 2 title',
* 'url'=>'http://www.yiiframework.com/',
* ),
* ),
* ))?>
* </pre>
*
* By default, the first tab will be activated. To activate a different tab
* when the page is initially loaded, set {@link activeTab} to be the ID of the desired tab.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.web.widgets
* @since 1.0
*/
class CTabView extends CWidget
后面还有 160 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
