本文整理匯總了PHP中CreateRenderer函數的典型用法代碼示例。如果您正苦於以下問題:PHP CreateRenderer函數的具體用法?PHP CreateRenderer怎麽用?PHP CreateRenderer使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CreateRenderer函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetDB
{
if (!$this->validate()) {
return FALSE;
}
$vDB = GetDB();
$vValues = $this->getSubmitValues(TRUE);
// $vId = $vValues['id'];
$vRecord = array();
if (!empty($vValues['id'])) {
$vRecord['id'] = $vValues['id'];
}
CopyRecordStrValue($vRecord, $vValues, 'name');
$vResult = $vDB->InsertOrUpdateById('rb_directions', $vRecord);
// var_dump($vRecord);
// var_dump($vDB);
return $vResult;
}
}
$vId = array_key_exists('id', $_GET) ? $_GET['id'] : '';
$vForm = new TEditor($vId);
if (!$vForm->Save()) {
$vTemplate =& CreateTemplate();
$vRenderer =& CreateRenderer($vTemplate);
$vForm->accept($vRenderer);
$vView =& new TBaseView();
$vView->form = $vRenderer->toObject();
$vTemplate->compile('refs/direction_edit.html');
$vTemplate->outputObject($vView);
} else {
RedirectToList('directions.html');
}
示例2: _renderForm
function _renderForm(&$page)
{
global $gTemplateName;
$vContainer =& $page->controller->container();
$vTemplate =& CreateTemplate();
$vRenderer =& CreateRenderer($vTemplate);
$page->accept($vRenderer);
$vView = new TPageView();
$vView->page =& $page;
$vView->form =& $vRenderer->toObject();
$vDefaults =& $vContainer['defaults'];
$vValues =& $vContainer['values'];
$vBaseInfoDefaults =& $vDefaults['BaseInfo'];
$vBaseInfoValues =& $vValues['BaseInfo'];
$vFirstPageDefaults =& $vDefaults[DatePageName(0)];
$vFirstPageValues =& $vValues[DatePageName(0)];
$vView->case_id = @$vBaseInfoDefaults['id'];
$vView->create_time = @Date2ReadableLong($vBaseInfoDefaults['create_time']);
$vBaseInfo =& $vBaseInfoDefaults;
if (DataAvailable($vBaseInfoValues)) {
$vBaseInfo =& $vBaseInfoValues;
}
$vView->name = FormatNameEx($vBaseInfo);
if (DocsEmpty($vBaseInfo)) {
$vView->docs_is_empty = true;
}
$vView->category = @FormatCategory($vBaseInfo['employment_category_id']);
$vView->age = 'полных лет ' . CalcAge(DateValueToStr($vBaseInfo['born_date']));
$vView->paytype = @GetPaytypeName($vBaseInfo['paytype']);
if (DataAvailable($vFirstPageValues)) {
$vView->disability_from_date = empty($vFirstPageValues['ill_doc']) ? '' : Date2ReadableLong(DateValueToStr($vFirstPageValues['disability_from_date']));
} else {
$vView->disability_from_date = empty($vFirstPageDefaults['ill_doc']) ? '' : Date2ReadableLong($vBaseInfoDefaults['disability_from_date']);
}
if (!empty($vContainer['_PopupURL'])) {
$vView->popup_url = $vContainer['_PopupURL'];
unset($vContainer['_PopupURL']);
}
$vTemplate->compile($gTemplateName);
$vTemplate->outputObject($vView);
}