本文整理汇总了PHP中BxTemplFormView::genInput方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplFormView::genInput方法的具体用法?PHP BxTemplFormView::genInput怎么用?PHP BxTemplFormView::genInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxTemplFormView
的用法示例。
在下文中一共展示了BxTemplFormView::genInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTimeline
function getTimeline($iStart, $iPerPage, $sFilter, $sTimeline, $aModules)
{
$aEvent = $this->_oDb->getEvents(array('browse' => 'last', 'owner_id' => $this->_oModule->_iOwnerId, 'filter' => $sFilter, 'modules' => $aModules));
if (empty($aEvents) || !is_array($aEvents)) {
return "";
}
$iMaxDuration = (int) $aEvent['ago_days'] + 1;
if (empty($sTimeline)) {
$sTimeline = '0' . BX_WALL_DIVIDER_TIMELINE . $iMaxDuration;
}
$aInput = array('type' => 'doublerange', 'name' => 'timeline', 'value' => $sTimeline, 'attrs' => array('min' => 0, 'max' => $iMaxDuration, 'onchange' => $this->_oConfig->getJsObject('view') . ".changeTimeline(e)"));
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView(array());
$sContent = $oForm->genInput($aInput);
$sContent = $oForm->genWrapperInput($aInput, $sContent);
return $this->parseHtmlByName('timeline.html', array('content' => $sContent));
}
示例2: _getCellSwitcher
protected function _getCellSwitcher($mixedValue, $sKey, $aField, $aRow)
{
$sAttr = $this->_convertAttrs($aField, 'attr_cell', 'bx-def-padding-sec-bottom bx-def-padding-sec-top', isset($aField['width']) ? 'width:' . $aField['width'] : false);
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView(array(), $this->_oTemplate);
$oForm->addCssJs();
$aInput = array('type' => 'switcher', 'name' => $this->_sObject . '_switch_' . $aRow[$this->_aOptions['field_id']], 'caption' => '', 'attrs' => array('bx_grid_action_single' => 'enable', 'bx_grid_action_confirm' => '', 'bx_grid_action_data' => $aRow[$this->_aOptions['field_id']]), 'value' => $aRow[$this->_aOptions['field_id']], 'checked' => $this->_isSwitcherOn(isset($aRow[$this->_aOptions['field_active']]) ? $aRow[$this->_aOptions['field_active']] : false, $sKey, $aField, $aRow));
$sSwitcher = $oForm->genInput($aInput);
return '<td ' . $sAttr . '>' . $sSwitcher . '</td>';
}