当前位置: 首页>>代码示例>>PHP>>正文


PHP CActiveForm::errorSummary方法代码示例

本文整理汇总了PHP中CActiveForm::errorSummary方法的典型用法代码示例。如果您正苦于以下问题:PHP CActiveForm::errorSummary方法的具体用法?PHP CActiveForm::errorSummary怎么用?PHP CActiveForm::errorSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CActiveForm的用法示例。


在下文中一共展示了CActiveForm::errorSummary方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: errorSummary

 public function errorSummary($models, $header = NULL, $footer = NULL, $htmlOptions = array())
 {
     $header = '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>';
     $footer = '';
     $htmlOptions = array_merge(array('class' => 'alert alert-danger'), $htmlOptions);
     return parent::errorSummary($models, $header, $footer, $htmlOptions);
 }
开发者ID:mmorpg2015,项目名称:ghtweb5,代码行数:7,代码来源:ActiveForm.php

示例2: errorSummary

 /**
  *### .errorSummary()
  *
  * Displays a summary of validation errors for one or several models.
  *
  * This method is very similar to {@link CHtml::errorSummary} except that it also works
  * when AJAX validation is performed.
  *
  * @param mixed $models the models whose input errors are to be displayed. This can be either
  * a single model or an array of models.
  * @param string $header a piece of HTML code that appears in front of the errors
  * @param string $footer a piece of HTML code that appears at the end of the errors
  * @param array $htmlOptions additional HTML attributes to be rendered in the container div tag.
  * @return string the error summary. Empty if no errors are found.
  *
  * @see CHtml::errorSummary
  */
 public function errorSummary($models, $header = null, $footer = null, $htmlOptions = array())
 {
     if (!isset($htmlOptions['class'])) {
         $htmlOptions['class'] = 'alert alert-block alert-error';
     }
     // Bootstrap error class as default
     return parent::errorSummary($models, $header, $footer, $htmlOptions);
 }
开发者ID:robebeye,项目名称:isims,代码行数:25,代码来源:TbActiveForm.php

示例3: errorSummary

 /**
  * Displays a summary of validation errors for one or several models.
  *
  * This method is a wrapper for {@link \CActiveForm::errorSummary}.
  *
  * @param mixed $models The models whose input errors are to be displayed. This can be either a single model or an array of models.
  * @param string $header A piece of HTML code that appears in front of the errors
  * @param string $footer A piece of HTML code that appears at the end of the errors
  * @param array $htmlOptions Additional HTML attributes to be rendered in the container div tag.
  * @return string The error summary. Empty if no errors are found.
  * @see \CActiveForm::errorSummary
  */
 public function errorSummary($models, $header = null, $footer = null, $htmlOptions = [])
 {
     if (!isset($htmlOptions['class'])) {
         $htmlOptions['class'] = 'alert alert-block alert-error';
     }
     return parent::errorSummary($models, $header, $footer, $htmlOptions);
 }
开发者ID:intersvyaz,项目名称:yii-bootstrap,代码行数:19,代码来源:ActiveForm.php

示例4: errorSummary

 /**
  * Error Summary
  *
  * A wrapper for the errorSummary() method in the parent class, CActiveForm, to allow for form objects to be
  * passed as well as form models.
  *
  * @access public
  * @param CForm|CModel $formModel
  * @param string $header
  * @param string $footer
  * @param array $htmlOptions
  * @return string
  */
 public function errorSummary($formModel, $header = null, $footer = null, $htmlOptions = array())
 {
     if ($formModel instanceof \CForm && isset($formModel->model) && $formModel->model instanceof \CModel) {
         $formModel = $formModel->model;
     }
     return parent::errorSummary($formModel, $header, $footer, $htmlOptions);
 }
开发者ID:mynameiszanders,项目名称:yii-forms,代码行数:20,代码来源:ActiveForm.php

示例5: errorSummary

 /**
  * Displays a summary of validation errors for one or several models.
  * This method is very similar to {@link TbHtml::errorSummary} except that it also works
  * when AJAX validation is performed.
  * @param mixed $models the models whose input errors are to be displayed. This can be either
  * a single model or an array of models.
  * @param string $header a piece of HTML code that appears in front of the errors
  * @param string $footer a piece of HTML code that appears at the end of the errors
  * @param array $htmlOptions additional HTML attributes to be rendered in the container div tag.
  * @return string the error summary. Empty if no errors are found.
  * @see TbHtml::errorSummary
  */
 public function errorSummary($models, $header = null, $footer = null, $htmlOptions = array())
 {
     $htmlOptions = TbHtml::addClassName('alert alert-block alert-error', $htmlOptions);
     return parent::errorSummary($models, $header, $footer, $htmlOptions);
 }
开发者ID:yii-twbs,项目名称:yiistrap,代码行数:17,代码来源:TbActiveForm.php

示例6: run

 public function run()
 {
     echo $this->form->errorSummary($this->model);
     $this->renderContent();
 }
开发者ID:anmolview,项目名称:yiidemos,代码行数:5,代码来源:CCForm.php

示例7: errorSummary

 public function errorSummary($models, $header = null, $footer = null, $htmlOptions = array())
 {
     $htmlOptions['class'] = $this->errorMessageCssClass;
     return parent::errorSummary($models, $header, $footer, $htmlOptions);
 }
开发者ID:hiproz,项目名称:mincms,代码行数:5,代码来源:ActiveForm.php

示例8: CActiveForm

if (($c = count($models)) == 0) {
    ?>
    <h5>нет купонов</h5>
<?php 
}
?>
    <script>
        var COUPON_CNT = <?php 
echo $c;
?>
;
    </script>
<?php 
$form = new CActiveForm();
foreach ($models as $i => $model) {
    echo $form->errorSummary($model);
    ?>
<a href="#edit" class="flag">
    <div class="percent"><?php 
    echo $model->percent;
    ?>
%</div>
        <div class="info">
                <div class="vd"><?php 
    echo $model->price;
    ?>
 VD</div>
                <div class="buy">Купить <?php 
    echo $model->type == 0 ? "скидку" : "сертификат";
    ?>
</div>
开发者ID:BGCX067,项目名称:facecom-svn-to-git,代码行数:31,代码来源:_form_coupon.php


注:本文中的CActiveForm::errorSummary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。