當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CForm::renderBegin方法代碼示例

本文整理匯總了PHP中CForm::renderBegin方法的典型用法代碼示例。如果您正苦於以下問題:PHP CForm::renderBegin方法的具體用法?PHP CForm::renderBegin怎麽用?PHP CForm::renderBegin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CForm的用法示例。


在下文中一共展示了CForm::renderBegin方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: renderBegin

 /**
  * Renders the open tag of the form. The default implementation will render the open form tag.
  * @return string The rendering result.
  */
 public function renderBegin()
 {
     if (!$this->getParent() instanceof self and !isset($this->activeForm['class'])) {
         $this->activeForm['class'] = 'TbActiveForm';
     }
     return parent::renderBegin();
 }
開發者ID:Aldanzein,項目名稱:bursa-kerja,代碼行數:11,代碼來源:TbForm.php

示例2: run

 public function run()
 {
     $htmlOptions = array_merge(array('class' => 'form wide'), $this->htmlOptions);
     $form = new CForm($this->form, $this->form['model']);
     echo CHtml::openTag('div', $htmlOptions);
     echo $form->renderBegin();
     foreach ($form->getElements() as $element) {
         echo CHtml::openTag('div', array('class' => 'row'));
         echo $element->render();
         echo '</div>';
     }
     echo '<div style="display:block; height:30px; margin-top:10px;">';
     echo $form->renderButtons();
     echo '</div>';
     echo $form->getActiveFormWidget()->errorSummary($this->form['model']) . "\n";
     echo $form->renderEnd();
     echo '</div>';
 }
開發者ID:balrok,項目名稱:aiajaya,代碼行數:18,代碼來源:FormRenderer.php

示例3: CForm

<?php

/**
 * Created by PhpStorm.
 * User: james
 * Date: 8/28/15
 * Time: 12:26 PM
 */
//print_r($elements); die;
if (isset($modelArray[0]) && isset($elements['elements'][0])) {
    $formHead = new CForm(array_merge($elements['elements'][0], ContextController::getDefaultElements()), $modelArray[0]);
    echo $formHead->renderBegin();
}
echo CHtml::tag('div', ['class' => 'form'], false, false);
echo CHtml::tag('table', ['class' => 'tabular-container'], false, false);
echo CHtml::tag('thead', ['class' => 'tabular-header'], false, false);
echo CHtml::tag('tr', [], $tableHeader);
echo CHtml::closeTag('thead');
echo CHtml::tag('tbody', ['class' => 'tabular-input-container'], false, false);
foreach ($modelArray as $modelIndex => $model) {
    echo CHtml::tag('tr', ['class' => 'tabular-input'], false, false);
    $form = new CForm($elements['elements'][$modelIndex], $model);
    foreach ($form->getElements() as $element) {
        $element->name = "[{$modelIndex}]{$element->name}";
        echo CHtml::tag('td', [], $element->renderInput());
    }
    echo CHtml::closeTag('tr');
    //$form[$modelIndex] = $model;
}
echo CHtml::closeTag('tbody');
echo CHtml::closeTag('table');
開發者ID:schrapps,項目名稱:risksur,代碼行數:31,代碼來源:editMultipleComponents.php


注:本文中的CForm::renderBegin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。