本文整理汇总了PHP中BxTemplFormView::genInputButton方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplFormView::genInputButton方法的具体用法?PHP BxTemplFormView::genInputButton怎么用?PHP BxTemplFormView::genInputButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxTemplFormView
的用法示例。
在下文中一共展示了BxTemplFormView::genInputButton方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: blockFiles
function blockFiles(&$aData)
{
$iEntryId = $aData['id'];
$aReadyMedia = array();
if ($iEntryId) {
$aReadyMedia = $GLOBALS['oBxStoreModule']->_oDb->getFiles($iEntryId, true);
}
if (!$aReadyMedia) {
return '';
}
$aVars = array('bx_repeat:files' => array());
$sCurrencySign = getParam('pmt_default_currency_sign');
foreach ($aReadyMedia as $r) {
$iMediaId = $r['media_id'];
$a = BxDolService::call('files', 'get_file_array', array($iMediaId), 'Search');
if (!$a['date']) {
continue;
}
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView(array());
$aInputBtnDownload = array('type' => 'submit', 'name' => 'bx_store_download', 'value' => _t('_bx_store_download'), 'attrs' => array('onclick' => "window.open ('" . BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "download/{$r['id']}','_self');"));
$aVars['bx_repeat:files'][] = array('id' => $iMediaId, 'title' => $a['title'], 'icon' => $a['file'], 'price' => $sCurrencySign . ' ' . $r['price'], 'for_group' => sprintf(_t('_bx_store_for_group'), $GLOBALS['oBxStoreModule']->getGroupName($r['allow_purchase_to'])), 'date' => defineTimeInterval($a['date']), 'bx_if:purchase' => array('condition' => $GLOBALS['oBxStoreModule']->isAllowedPurchase($r), 'content' => array('btn_purchase' => BxDolService::call('payment', 'get_add_to_cart_link', array($r['author_id'], $this->_oConfig->getId(), $r['id'], 1)))), 'bx_if:download' => array('condition' => $GLOBALS['oBxStoreModule']->isAllowedDownload($r), 'content' => array('btn_download' => $oForm->genInputButton($aInputBtnDownload))));
}
if (!$aVars['bx_repeat:files']) {
return '';
}
return $this->parseHtmlByName('block_files', $aVars);
}
示例2: array
function _blockFiles($aReadyMedia, $iAuthorId = 0)
{
if (!$aReadyMedia) {
return '';
}
$aVars = array('bx_repeat:files' => array());
foreach ($aReadyMedia as $iMediaId) {
$a = BxDolService::call('files', 'get_file_array', array($iMediaId), 'Search');
if (!$a['date']) {
continue;
}
bx_import('BxTemplFormView');
$oForm = new BxTemplFormView(array());
$aInputBtnDownload = array('type' => 'submit', 'name' => 'download', 'value' => _t('_download'), 'attrs' => array('class' => 'bx-btn-small', 'onclick' => "window.open ('" . BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "download/" . $this->aDataEntry[$this->_oDb->_sFieldId] . "/{$iMediaId}','_self');"));
$aVars['bx_repeat:files'][] = array('id' => $iMediaId, 'title' => $a['title'], 'icon' => $a['file'], 'date' => defineTimeInterval($a['date']), 'btn_download' => $oForm->genInputButton($aInputBtnDownload));
}
if (!$aVars['bx_repeat:files']) {
return '';
}
return $this->_oTemplate->parseHtmlByName('entry_view_block_files', $aVars);
}