本文整理汇总了PHP中BxTemplFormView::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplFormView::__construct方法的具体用法?PHP BxTemplFormView::__construct怎么用?PHP BxTemplFormView::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BxTemplFormView
的用法示例。
在下文中一共展示了BxTemplFormView::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: BxDolProfileFields
function __construct()
{
$oProfileFields = new BxDolProfileFields(0);
$aCountries = $oProfileFields->convertValues4Input('#!Country');
$aCountries = array_merge(array('' => _t('_bx_events_all_countries')), $aCountries);
$aCustomForm = array('form_attrs' => array('name' => 'form_search_events', 'action' => '', 'method' => 'get'), 'params' => array('db' => array('submit_name' => 'submit_form'), 'csrf' => array('disable' => true)), 'inputs' => array('Keyword' => array('type' => 'text', 'name' => 'Keyword', 'caption' => _t('_bx_events_caption_keyword'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_events_err_keyword')), 'db' => array('pass' => 'Xss')), 'Country' => array('type' => 'select_box', 'name' => 'Country', 'caption' => _t('_bx_events_caption_country'), 'values' => $aCountries, 'required' => true, 'checker' => array('func' => 'preg', 'params' => array('/^[a-zA-Z]{0,2}$/'), 'error' => _t('_bx_events_err_country')), 'db' => array('pass' => 'Preg', 'params' => array('/([a-zA-Z]{0,2})/'))), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true)));
parent::__construct($aCustomForm);
}
示例2: array
function __construct($oModule, $aParam = array())
{
$this->_oModule = $oModule;
$this->_aParam = $aParam;
$this->_aCustomForm = count($this->_aParam) > 0 ? $this->getFullForm() : $this->getUrlForm();
$aFormInputsSubmit = array('Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => false));
$this->_aCustomForm['inputs'] = array_merge($this->_aCustomForm['inputs'], $aFormInputsSubmit);
parent::__construct($this->_aCustomForm);
}
示例3: BxDolCategories
function __construct()
{
bx_import('BxDolCategories');
$oCategories = new BxDolCategories();
$oCategories->getTagObjectConfig();
$aCategories = $oCategories->getCategoriesList('bx_store', (int) $iProfileId, true);
$aCustomForm = array('form_attrs' => array('name' => 'form_search_store', 'action' => '', 'method' => 'get'), 'params' => array('db' => array('submit_name' => 'submit_form'), 'csrf' => array('disable' => true)), 'inputs' => array('Keyword' => array('type' => 'text', 'name' => 'Keyword', 'caption' => _t('_bx_store_form_caption_keyword'), 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => _t('_bx_store_form_err_keyword')), 'db' => array('pass' => 'Xss')), 'Category' => array('type' => 'select_box', 'name' => 'Category', 'caption' => _t('_bx_store_form_caption_category'), 'values' => $aCategories, 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_bx_store_form_err_category')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => true)));
parent::__construct($aCustomForm);
}
示例4: BxDolModuleDb
function __construct($aCustomForm)
{
if (isset($aCustomForm['inputs']['allow_post_in_forum_to']['type'])) {
$oModuleDb = new BxDolModuleDb();
if (!$oModuleDb->getModuleByUri('forum')) {
$aCustomForm['inputs']['allow_post_in_forum_to']['type'] = 'hidden';
}
}
parent::__construct($aCustomForm);
}
示例5: array
function __construct($oMain, $sMsgNoUsers)
{
$aVisitorsPreapare = $oMain->_oDb->getPotentialVisitors($oMain->_iProfileId);
$aVisitors = array();
foreach ($aVisitorsPreapare as $k => $r) {
$aVisitors[] = array('Icon' => $GLOBALS['oFunctions']->getMemberIcon($r['ID'], 'left'), 'Link' => getProfileLink($r['ID']), 'NickName' => getNickName($r['ID']), 'ID' => $r['ID']);
}
$aVars = array('bx_repeat:rows' => $aVisitors, 'msg_no_users' => $aVisitors ? '' : $sMsgNoUsers);
$aCustomForm = array('form_attrs' => array('name' => 'form_inviter', 'action' => '', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'submit_form')), 'inputs' => array('inviter_users' => array('type' => 'custom', 'content' => $oMain->_oTemplate->parseHtmlByName('inviter', $aVars), 'name' => 'inviter_users', 'caption' => _t('_sys_invitation_step_select_users'), 'info' => _t('_sys_invitation_step_select_users_info'), 'required' => false, 'db' => array('pass' => 'Int')), 'inviter_emails' => array('type' => 'textarea', 'name' => 'inviter_emails', 'caption' => _t('_sys_invitation_step_additional_emails'), 'info' => _t('_sys_invitation_step_additional_emails_info'), 'db' => array('pass' => 'Xss')), 'inviter_text' => array('type' => 'textarea', 'name' => 'inviter_text', 'caption' => _t('_sys_invitation_step_invitation_text'), 'info' => _t('_sys_invitation_step_invitation_text_info'), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'))));
parent::__construct($aCustomForm);
}
示例6: __construct
public function __construct($aInfo, $oTemplate)
{
parent::__construct($aInfo, $oTemplate);
$aNoRelocatePages = array('forgot-password', 'login', 'create-account', 'logout');
$sRelocate = bx_process_input(bx_get('relocate'));
if (!$sRelocate && isset($_SERVER['HTTP_REFERER']) && 0 === mb_stripos($_SERVER['HTTP_REFERER'], BX_DOL_URL_ROOT)) {
$sRelocate = $_SERVER['HTTP_REFERER'];
foreach ($aNoRelocatePages as $s) {
if (false !== mb_stripos($_SERVER['HTTP_REFERER'], $s)) {
$sRelocate = BX_DOL_URL_ROOT . 'member.php';
break;
}
}
}
$this->aInputs['relocate']['value'] = $sRelocate ? $sRelocate : BX_DOL_URL_ROOT . 'member.php';
}
示例7: array
/**
* Constructor
* @param $sName the name of form field from main form, where this nested form is inserted.
* @param $aForm form array, actually only form inout are needed, all other attributes are taken from parent form automatically.
* @param $sSubmitName main form submit_name; field name of submit form input to determine if form is submitted or not.
* @param $oTemplate optional template object
*/
function __construct($sName, $aForm, $sSubmitName = false, $oTemplate = false)
{
if (!isset($aForm['params']['nested_form_template']) || !$aForm['params']['nested_form_template']) {
$aForm['params']['nested_form_template'] = 'uploader_nested_form_wrapper.html';
}
$aForm['form_attrs']['id'] = $sName . '_{file_id}';
$aForm['form_attrs']['method'] = 'specific';
$aForm['params']['remove_form'] = true;
$aForm['params']['csrf']['disable'] = true;
if ($sSubmitName) {
$aForm['params']['db']['submit_name'] = $sSubmitName;
}
if (!isset($aForm['inputs'][$sName])) {
$aForm['inputs'][$sName] = array('type' => 'hidden', 'name' => $sName . '[]', 'value' => '{file_id}');
}
parent::__construct($aForm, $oTemplate);
}
示例8: __construct
public function __construct($aInfo, $oTemplate)
{
parent::__construct($aInfo, $oTemplate);
$this->_sStorageObject = 'sys_cmts_images';
$this->_sTranscoderPreview = 'sys_cmts_images_preview';
$this->_aImageUploaders = array('sys_cmts_simple');
if (isset($this->aInputs['cmt_image'])) {
$aFormNested = array('params' => array('nested_form_template' => 'comments_uploader_nfw.html'), 'inputs' => array());
$oFormNested = new BxDolFormNested('cmt_image', $aFormNested, 'cmt_submit');
$this->aInputs['cmt_image']['storage_object'] = $this->_sStorageObject;
$this->aInputs['cmt_image']['images_transcoder'] = $this->_sTranscoderPreview;
$this->aInputs['cmt_image']['uploaders'] = $this->_aImageUploaders;
$this->aInputs['cmt_image']['upload_buttons_titles'] = array('Simple' => 'camera');
$this->aInputs['cmt_image']['multiple'] = true;
$this->aInputs['cmt_image']['ghost_template'] = $oFormNested;
}
}
示例9: array
function __construct($oTemplate = false)
{
$aInfo = array('form_attrs' => array('id' => 'sys-splash-domain'), 'params' => array('db' => array('submit_name' => 'domain_submit')), 'inputs' => array('domain' => array('type' => 'domain', 'name' => 'domain', 'value' => '', 'value_postfix' => _t('_sys_splash_inp_postfix'), 'value_button' => _t('_sys_splash_btn_start'), 'attrs' => array('placeholder' => _t('_sys_splash_inp_placeholder')), 'db' => array('pass' => 'Xss'), 'checker' => array('func' => 'preg', 'params' => array('/^[a-z0-9-]{3,}$/'), 'error' => _t('_sys_splash_err_domain_incorrect')))));
parent::__construct($aInfo, $oTemplate);
}
示例10: array
function __construct($sCaptionMsgTitle, $sErrMsgTitle, $sCaptionMsgBody, $sErrMsgBory)
{
$aCustomForm = array('form_attrs' => array('name' => 'form_broadcast', 'action' => '', 'method' => 'post'), 'params' => array('db' => array('submit_name' => 'submit_form')), 'inputs' => array('title' => array('type' => 'text', 'name' => 'title', 'caption' => $sCaptionMsgTitle, 'required' => true, 'checker' => array('func' => 'length', 'params' => array(3, 100), 'error' => $sErrMsgTitle), 'db' => array('pass' => 'Xss')), 'message' => array('type' => 'textarea', 'name' => 'message', 'caption' => $sCaptionMsgBody, 'required' => true, 'checker' => array('func' => 'length', 'params' => array(10, 64000), 'error' => $sErrMsgBory), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'))));
parent::__construct($aCustomForm);
}
示例11: __construct
public function __construct($aInfo, $oTemplate)
{
parent::__construct($aInfo, $oTemplate);
}
示例12: array
function __construct($oModule)
{
$aCustomForm = array('form_attrs' => array('id' => 'bx-oauth-add', 'name' => 'bx-oauth-add', 'action' => BX_DOL_URL_ROOT . $oModule->_oConfig->getBaseUri() . 'administration', 'method' => 'post'), 'params' => array('db' => array('table' => 'bx_oauth_clients', 'key' => 'id', 'submit_name' => 'client_add')), 'inputs' => array('title' => array('type' => 'text', 'name' => 'title', 'caption' => _t('_Title'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_sys_adm_form_err_required_field')), 'db' => array('pass' => 'Xss')), 'redirect_uri' => array('type' => 'text', 'name' => 'redirect_uri', 'caption' => _t('_URL'), 'required' => true, 'checker' => array('func' => 'avail', 'error' => _t('_sys_adm_form_err_required_field')), 'db' => array('pass' => 'Xss')), 'Submit' => array('type' => 'submit', 'name' => 'client_add', 'value' => _t('_Submit'), 'colspan' => true)));
parent::__construct($aCustomForm);
}
示例13: array
function __construct($sTitle, $sId)
{
$aCustomForm = array('form_attrs' => array('id' => 'sys-adm-dnsbl-recheck', 'name' => 'sys-adm-dnsbl-recheck', 'onsubmit' => "return bs_sys_adm_dbsbl_recheck(\$('#{$sId}').val());", 'method' => 'post'), 'inputs' => array('test' => array('type' => 'text', 'attrs' => array('id' => $sId), 'name' => $sId, 'caption' => $sTitle, 'required' => true), 'Submit' => array('type' => 'submit', 'name' => 'dnsbl_recheck', 'value' => _t('_Submit'), 'colspan' => true)));
parent::__construct($aCustomForm);
}
示例14: array
function __construct()
{
$aCustomForm = array('form_attrs' => array('id' => 'sys-adm-sitemap', 'name' => 'sys-adm-sitemap', 'method' => 'post'), 'inputs' => array('sys_sitemap_generated' => array('type' => 'custom', 'content' => mb_strlen(@file_get_contents(BxDolSiteMaps::getSiteMapIndexPath())) > 32 ? '<span class="sys-adm-enabled">' . _t('_Yes') . '</span>' : '<span class="sys-adm-disabled">' . _t('_No') . '</span>', 'caption' => _t('_sys_sitemap_form_caption_sitemap_generated')), 'sys_sitemap_enable' => array('type' => 'checkbox', 'name' => 'sys_sitemap_enable', 'value' => 'on', 'checked' => 'on' == getParam('sys_sitemap_enable') ? true : false, 'caption' => _t('_sys_sitemap_form_caption')), 'Submit' => array('type' => 'submit', 'name' => 'sitemap_enable', 'value' => _t('_Submit'))));
parent::__construct($aCustomForm);
}
示例15: __construct
public function __construct($aInfo, $oTemplate = false)
{
parent::__construct($aInfo, $oTemplate);
$this->_oModule = BxDolModule::getInstance($this->MODULE);
}