本文整理匯總了PHP中ZurmoHtml::errorSummary方法的典型用法代碼示例。如果您正苦於以下問題:PHP ZurmoHtml::errorSummary方法的具體用法?PHP ZurmoHtml::errorSummary怎麽用?PHP ZurmoHtml::errorSummary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ZurmoHtml
的用法示例。
在下文中一共展示了ZurmoHtml::errorSummary方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: errorSummary
/**
* Override to handle relation model error summary information. This information needs to be parsed properly
* otherwise it will show up as 'Array' for the error text.
* @see CActiveForm::errorSummary()
*/
public function errorSummary($models, $header = null, $footer = null, $htmlOptions = array())
{
if (!$this->enableAjaxValidation && !$this->enableClientValidation) {
return ZurmoHtml::errorSummary($models, $header, $footer, $htmlOptions);
}
if (!isset($htmlOptions['id'])) {
$htmlOptions['id'] = $this->id . '_es_';
}
$html = ZurmoHtml::errorSummary($models, $header, $footer, $htmlOptions);
if ($html === '') {
if ($header === null) {
$header = '<p>' . Yii::t('yii', 'Please fix the following input errors:') . '</p>';
}
if (!isset($htmlOptions['class'])) {
$htmlOptions['class'] = ZurmoHtml::$errorSummaryCss;
}
if (isset($htmlOptions['style'])) {
$htmlOptions['style'] = rtrim($htmlOptions['style'], ';') . ';display:none';
} else {
$htmlOptions['style'] = 'display:none';
}
$html = ZurmoHtml::tag('div', $htmlOptions, $header . "\n<ul><li>dummy</li></ul>" . $footer);
}
$this->summaryID = $htmlOptions['id'];
return $html;
}
示例2: processSelectFromRelatedListSaveFails
protected function processSelectFromRelatedListSaveFails(RedBeanModel $model)
{
$header = Zurmo::t('ZurmoModule', 'Please resolve the following issues for {modelString}:', array('{modelString}' => strval($model)));
echo CJSON::encode(array('message' => ZurmoHtml::errorSummary(array($model), $header), 'messageType' => 'error'));
Yii::app()->end(0, false);
}