當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。