public static function changeFormField($aParams, &$aInputs, &$oDb) { $aInputs['module']['type'] = 'select'; $aInputs['module']['values'] = array_merge(array('' => _t('_bx_dev_frm_txt_select_module')), BxDolStudioUtils::getModules()); $aInputs['module']['value'] = $aParams['module']; $aInputs['object']['type'] = 'select'; $aInputs['object']['value'] = $aParams['object']; $aInputs['object']['values'] = array(); $aForms = array(); $oDb->getForms(array('type' => 'by_module', 'value' => $aParams['module']), $aForms, false); if (!empty($aForms) && is_array($aForms)) { foreach ($aForms as $aForm) { $aInputs['object']['values'][$aForm['object']] = _t($aForm['title']); } asort($aInputs['object']['values']); } $aInputs['object']['values'] = array_merge(array('' => _t('_bx_dev_frm_txt_select_object')), $aInputs['object']['values']); $aInputs['name']['type'] = 'text'; $sTrlTypePostfix = '_translatable'; $sTrlCheckFuncPostfix = 'Translatable'; foreach ($aInputs as $sName => $aInput) { if (isset($aInput['type']) && stripos($aInput['type'], $sTrlTypePostfix) !== false) { $aInputs[$sName]['type'] = str_ireplace($sTrlTypePostfix, '', $aInput['type']); if (isset($aInput['checker']['func']) && stripos($aInput['checker']['func'], $sTrlCheckFuncPostfix) !== false) { $aInputs[$sName]['checker']['func'] = str_ireplace($sTrlCheckFuncPostfix, '', $aInput['checker']['func']); } } } $aFields = array('editable' => array('type' => 'switcher', 'name' => 'editable', 'caption' => _t('_bx_dev_frm_txt_field_title_editable'), 'info' => _t('_bx_dev_frm_txt_field_info_editable'), 'value' => '1', 'required' => '0', 'db' => array('pass' => 'Int')), 'deletable' => array('type' => 'switcher', 'name' => 'deletable', 'caption' => _t('_bx_dev_frm_txt_field_title_deletable'), 'info' => _t('_bx_dev_frm_txt_field_info_deletable'), 'value' => '1', 'required' => '0', 'db' => array('pass' => 'Int'))); $aInputs = BxDolStudioUtils::addInArray($aInputs, 'controls', $aFields, false); }
protected function addInArray($aInput, $sKey, $aValues) { return BxDolStudioUtils::addInArray($aInput, $sKey, $aValues); }
protected function addInArray($aInput, $sKey, $aValues) { bx_import('BxDolStudioUtils'); return BxDolStudioUtils::addInArray($aInput, $sKey, $aValues); }
protected function addInArray($aInput, $sKey, $aValues, $bAddAfter = true) { return BxDolStudioUtils::addInArray($aInput, $sKey, $aValues, $bAddAfter); }