yiiapi/framework/web/helpers/CHtml.php
(开头部分) 111KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* CHtml class file.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
/**
* CHtml is a static class that provides a collection of helper methods for creating HTML views.
*
* Nearly all of the methods in this class allow setting additional html attributes for the html
* tags they generate. You can specify for example. 'class', 'style' or 'id' for an html element.
* For example when using <code>array('class' => 'my-class', 'target' => '_blank')</code> as htmlOptions
* it will result in the html attributes rendered like this: <code>class="my-class" target="_blank"</code>.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @package system.web.helpers
* @since 1.0
*/
class CHtml
{
const ID_PREFIX='yt';
/**
* @var string the CSS class for displaying error summaries (see {@link errorSummary}).
*/
public static $errorSummaryCss='errorSummary';
/**
* @var string the CSS class for displaying error messages (see {@link error}).
*/
public static $errorMessageCss='errorMessage';
/**
* @var string the CSS class for highlighting error inputs. Form inputs will be appended
* with this CSS class if they have input errors.
*/
public static $errorCss='error';
/**
* @var string the tag name for the error container tag. Defaults to 'div'.
* @since 1.1.13
*/
public static $errorContainerTag='div';
/**
* @var string the CSS class for required labels. Defaults to 'required'.
* @see label
*/
public static $requiredCss='required';
/**
* @var string the HTML code to be prepended to the required label.
* @see label
*/
public static $beforeRequiredLabel='';
/**
* @var string the HTML code to be appended to the required label.
* @see label
*/
public static $afterRequiredLabel=' <span class="required">*</span>';
/**
后面还有 2777 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
