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


PHP CTabView::setAttribute方法代碼示例

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


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

示例1: array

} else {
    $screenFormList->addVar('width', 500);
    $screenFormList->addVar('height', 100);
}
if (in_array($resourceType, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_MAP, SCREEN_RESOURCE_CLOCK, SCREEN_RESOURCE_URL))) {
    $hightAlignRadioButton = array(new CRadioButton('halign', HALIGN_LEFT, null, 'halign_' . HALIGN_LEFT, $halign == HALIGN_LEFT), new CLabel(_('Left'), 'halign_' . HALIGN_LEFT), new CRadioButton('halign', HALIGN_CENTER, null, 'halign_' . HALIGN_CENTER, $halign == HALIGN_CENTER), new CLabel(_('Center'), 'halign_' . HALIGN_CENTER), new CRadioButton('halign', HALIGN_RIGHT, null, 'halign_' . HALIGN_RIGHT, $halign == HALIGN_RIGHT), new CLabel(_('Right'), 'halign_' . HALIGN_RIGHT));
    $screenFormList->addRow(_('Horizontal align'), new CDiv($hightAlignRadioButton, 'jqueryinputset'));
} else {
    $screenFormList->addVar('halign', 0);
}
$verticalAlignRadioButton = array(new CRadioButton('valign', VALIGN_TOP, null, 'valign_' . VALIGN_TOP, $valign == VALIGN_TOP), new CLabel(_('Top'), 'valign_' . VALIGN_TOP), new CRadioButton('valign', VALIGN_MIDDLE, null, 'valign_' . VALIGN_MIDDLE, $valign == VALIGN_MIDDLE), new CLabel(_('Middle'), 'valign_' . VALIGN_MIDDLE), new CRadioButton('valign', VALIGN_BOTTOM, null, 'valign_' . VALIGN_BOTTOM, $valign == VALIGN_BOTTOM), new CLabel(_('Bottom'), 'valign_' . VALIGN_BOTTOM));
$screenFormList->addRow(_('Vertical align'), new CDiv($verticalAlignRadioButton, 'jqueryinputset'));
$screenFormList->addRow(_('Column span'), new CNumericBox('colspan', $colspan, 3));
$screenFormList->addRow(_('Row span'), new CNumericBox('rowspan', $rowspan, 3));
// dynamic addon
if ($this->data['screen']['templateid'] == 0 && in_array($resourceType, array(SCREEN_RESOURCE_GRAPH, SCREEN_RESOURCE_SIMPLE_GRAPH, SCREEN_RESOURCE_PLAIN_TEXT))) {
    $screenFormList->addRow(_('Dynamic item'), new CCheckBox('dynamic', $dynamic, null, 1));
}
// append tabs to form
$screenTab = new CTabView();
$screenTab->setAttribute('style', 'text-align: left;');
$screenTab->addTab('screenTab', _('Screen cell configuration'), $screenFormList);
$screenForm->addItem($screenTab);
// append buttons to form
$buttons = array();
if (isset($_REQUEST['screenitemid'])) {
    array_push($buttons, new CButtonDelete(null, url_param('form') . url_param('screenid') . url_param('screenitemid')));
}
array_push($buttons, new CButtonCancel(url_param('screenid')));
$screenForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), $buttons));
return $screenForm;
開發者ID:itnihao,項目名稱:zatree-2.2,代碼行數:31,代碼來源:configuration.screen.constructor.edit.php


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