libs/Yii/web/widgets/CTreeView.php
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* CTreeView 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/
*/
/**
* CTreeView displays a tree view of hierarchical data.
*
* It encapsulates the excellent tree view plugin for jQuery
* ({@link http://bassistance.de/jquery-plugins/jquery-plugin-treeview/}).
*
* To use CTreeView, simply sets {@link data} to the data that you want
* to present and you are there.
*
* CTreeView also supports dynamic data loading via AJAX. To do so, set
* {@link url} to be the URL that can serve the tree view data upon request.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
* @package system.web.widgets
* @since 1.0
*/
class CTreeView extends CWidget
{
/**
* @var array the data that can be used to generate the tree view content.
* Each array element corresponds to a tree view node with the following structure:
* <ul>
* <li>text: string, required, the HTML text associated with this node.</li>
* <li>expanded: boolean, optional, whether the tree view node is expanded.</li>
* <li>id: string, optional, the ID identifying the node. This is used
* in dynamic loading of tree view (see {@link url}).</li>
* <li>hasChildren: boolean, optional, defaults to false, whether clicking on this
* node should trigger dynamic loading of more tree view nodes from server.
* The {@link url} property must be set in order to make this effective.</li>
* <li>children: array, optional, child nodes of this node.</li>
* <li>htmlOptions: array, additional HTML attributes (see {@link CHtml::tag}).
* This option has been available since version 1.1.7.</li>
* </ul>
* Note, anything enclosed between the beginWidget and endWidget calls will
* also be treated as tree view content, which appends to the content generated
* from this data.
*/
public $data;
/**
* @var mixed the CSS file used for the widget. Defaults to null, meaning
* using the default CSS file included together with the widget.
* If false, no CSS file will be used. Otherwise, the specified CSS file
* will be included when using this widget.
*/
public $cssFile;
/**
* @var string|array the URL to which the treeview can be dynamically loaded (in AJAX).
* See {@link CHtml::normalizeUrl} for possible URL formats.
* Setting this property will enable the dynamic treeview loading.
后面还有 186 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
