本文整理汇总了PHP中CRM_Core_Form::postProcess方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form::postProcess方法的具体用法?PHP CRM_Core_Form::postProcess怎么用?PHP CRM_Core_Form::postProcess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Form
的用法示例。
在下文中一共展示了CRM_Core_Form::postProcess方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postProcess
public function postProcess()
{
$values = $this->exportValues();
$options = $this->getColorOptions();
CRM_Core_Session::setStatus(ts('You picked color "%1"', array(1 => $options[$values['favorite_color']])));
parent::postProcess();
}
示例2: postProcess
function postProcess()
{
$values = $this->exportValues();
$pcp_type_contact = $values['pcp_contact_id'];
$pcp_type = $values['pcp_type'];
$custom_group_name = CRM_Pcpteams_Constant::C_PCP_CUSTOM_GROUP_NAME;
$customGroupParams = array('version' => 3, 'sequential' => 1, 'name' => $custom_group_name);
$custom_group_ret = civicrm_api('CustomGroup', 'GET', $customGroupParams);
$customGroupID = $custom_group_ret['id'];
$customGroupTableName = $custom_group_ret['values'][0]['table_name'];
$query = "SELECT ct.pcp_type_contact as contactID FROM {$customGroupTableName} ct WHERE ct.pcp_type = '{$pcp_type}'";
$dao = CRM_Core_DAO::executeQuery($query);
$pcpFound = FALSE;
while ($dao->fetch()) {
if ($dao->contactID == $pcp_type_contact) {
CRM_Core_Session::setStatus(ts('PCP Found. Redirecting to dashboard'));
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/pcp/dashboard', 'reset=1'));
$pcpFound = TRUE;
break;
}
}
if (!$pcpFound) {
CRM_Core_Session::setStatus(ts('PCP Not Found. Creating New PCP Record'));
$PcpID = $this->_pcpId;
$insertQuery = "\n INSERT INTO `civicrm_value_pcp_custom_set` (`id`, `entity_id`, `team_pcp_id`, `pcp_type`, `pcp_type_contact`) VALUES (NULL, {$PcpID}, NULL, '{$pcp_type}', {$pcp_type_contact})";
$dao = CRM_Core_DAO::executeQuery($insertQuery);
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/pcp/dashboard', 'reset=1'));
}
//Fixme:
parent::postProcess();
}
示例3: postProcess
/**
* Save values.
*/
public function postProcess()
{
$values = $this->exportValues();
try {
$result = civicrm_api3('Setting', 'create', array('statelegemail_key' => $values['key']));
$success = TRUE;
} catch (CiviCRM_API3_Exception $e) {
$error = $e->getMessage();
CRM_Core_Error::debug_log_message(t('API Error: %1', array(1 => $error, 'domain' => 'com.aghstrategies.statelegemail')));
CRM_Core_Session::setStatus(ts('Error saving Sunlight Foundation API key', array('domain' => 'com.aghstrategies.statelegemail')), 'Error', 'error');
$success = FALSE;
}
try {
$result = civicrm_api3('Setting', 'create', array('statelegemail_states' => $values['states']));
} catch (CiviCRM_API3_Exception $e) {
$error = $e->getMessage();
CRM_Core_Error::debug_log_message(t('API Error: %1', array(1 => $error, 'domain' => 'com.aghstrategies.statelegemail')));
CRM_Core_Session::setStatus(ts('Error saving enabled states', array('domain' => 'com.aghstrategies.statelegemail')), 'Error', 'error');
$success = FALSE;
}
if ($success) {
CRM_Core_Session::setStatus(ts('You have successfully updated the state legislator petition settings.', array('domain' => 'com.aghstrategies.statelegemail')), 'Settings saved', 'success');
}
parent::postProcess();
}
示例4: postProcess
function postProcess()
{
$vals = $this->controller->exportValues($this->_name);
CRM_Core_Session::setStatus(ts('You saved a new room </br>' . 'label: %1 </br>' . 'room_no: %2 </br>' . 'floor: %3 </br>' . 'ext: %4', array(1 => $vals['label'], 2 => $vals['room_no'], 3 => $vals['floor'], 4 => $vals['ext'])));
$query = "INSERT INTO civicrm_room (label, room_no, floor, ext) " . "VALUES ('{$vals['label']}', '{$vals['room_no']}', '{$vals['floor']}','{$vals['ext']}')";
$count = CRM_Core_DAO::singleValueQuery($query);
parent::postProcess();
}
示例5: postProcess
function postProcess()
{
$values = $this->exportValues();
civicrm_api3('setting', 'create', array('sequential' => 1, 'default_wci_profile' => $values['default_profile']));
civicrm_api3('setting', 'create', array('sequential' => 1, 'widget_cache_timeout' => $values['widget_cache_timeout']));
CRM_Core_Session::setStatus(ts('Widget settings are saved to database'), '', 'success');
parent::postProcess();
}
示例6: postProcess
public function postProcess()
{
$values = $this->exportValues();
$utils = new CRM_Eventpermissions_Utils();
$utils->setHostId($values['permission_role']);
CRM_Core_Session::setStatus(ts('Permissioned role(s) updated.', array('domain' => 'com.aghstrategies.eventpermissions')));
parent::postProcess();
}
示例7: postProcess
function postProcess()
{
$values = $this->exportValues();
$tagConverter = new CRM_MailchimpConverter_TagConverter();
$converted = $tagConverter->convert($values['original_template']);
$this->assign('convertedTemplate', $converted);
parent::postProcess();
}
示例8: postProcess
/**
* {@inheritdoc}
*/
public function postProcess()
{
$values = $this->exportValues();
$settings = new stdClass();
$settings->globally_enabled = empty($values['globally_enabled']) ? 0 : 1;
$settings->financial_types_enabled = $values['financial_types_enabled'];
CRM_Core_BAO_Setting::setItem($settings, 'Extension', 'uk.co.compucorp.civicrm.giftaid:settings');
CRM_Core_Session::setStatus(ts('Settings saved'), '', 'success');
parent::postProcess();
}
示例9: postProcess
function postProcess()
{
$values = $this->exportValues();
$mailchimp_sync_setting = CRM_CiviMailchimp_BAO_SyncSettings::findByGroupId($values['group']);
$mailchimp_export_url = CRM_CiviMailchimp_Utils::formatMailchimpExportApiUrl($mailchimp_sync_setting->mailchimp_list_id);
list($contacts, $mailchimp_members) = self::processForcedSync($mailchimp_sync_setting, $mailchimp_export_url);
parent::postProcess();
CRM_Core_Session::setStatus(ts("%1 contacts were synced to Mailchimp and %2 Mailchimp members were synced to CiviCRM.", array(1 => count($contacts), 2 => count($mailchimp_members))), ts('CiviMailchimp Force Sync Successful'), 'success');
CRM_Utils_System::redirect($this->controller->_entryURL);
}
示例10: postProcess
function postProcess()
{
$query = "UPDATE civicrm_post_nummer SET post_city = %1, community_number = %2, community_name = %3,\n category = %4 WHERE post_code = %5";
$params = array(1 => array($this->_submitValues['post_city'], "String"), 2 => array($this->_submitValues['community_number'], "String"), 3 => array($this->_submitValues['community_name'], "String"), 4 => array($this->_submitValues['category'], "String"), 5 => array($this->_submitValues['post_code'], "String"));
CRM_Core_DAO::executeQuery($query, $params);
$session = CRM_Core_Session::singleton();
$session->setStatus("Post Code " . $this->_submitValues['post_code'] . " saved", "Saved", "success");
CRM_Utils_System::redirect($session->readUserContext());
parent::postProcess();
}
示例11: postProcess
function postProcess()
{
$values = $this->exportValues();
foreach (array('qfKey', '_qf_default', '_qf_IatsSettings_submit', 'entryURL') as $key) {
if (isset($values[$key])) {
unset($values[$key]);
}
}
CRM_Core_BAO_Setting::setItem($values, 'iATS Payments Extension', 'iats_settings');
parent::postProcess();
}
示例12: postProcess
/**
* Overridden parent method to process form
*
* @access public
*/
function postProcess()
{
$this->saveSegmentRoles($this->exportValues());
$session = CRM_Core_Session::singleton();
$config = CRM_Core_Config::singleton();
$session->setStatus("Segment Settings Saved", "Saved", "success");
if ($session->readUserContext() == $config->userFrameworkBaseURL) {
$session->pushUserContext(CRM_Utils_System::url('civicrm', 'reset=1', true));
}
parent::postProcess();
}
示例13: postProcess
function postProcess()
{
$values = $this->exportValues();
// process menu entry
$old_menu_position = (int) CRM_Core_BAO_Setting::getItem('CiviBanking', 'menu_position');
$new_menu_position = (int) $values['menu_position'];
if ($old_menu_position != $new_menu_position) {
CRM_Core_BAO_Setting::setItem($new_menu_position, 'CiviBanking', 'menu_position');
CRM_Core_Invoke::rebuildMenuAndCaches();
}
parent::postProcess();
}
示例14: postProcess
function postProcess()
{
include 'connect-mysql.php';
$values = $this->exportValues();
$LABEL = $values['label'];
$NUMBER = $values['room_no'];
$FLOOR = $values['floor_no'];
$EXT = $values['room_ext'];
$sqlinsert = "INSERT INTO roomdb (label, room_no, floor_no, room_ext) VALUES ('{$LABEL}', '{$NUMBER}', '{$FLOOR}', '{$EXT}')";
mysqli_query($dbcon, $sqlinsert);
parent::postProcess();
}
示例15: postProcess
function postProcess()
{
$submitValues = $this->_submitValues;
$cid = $submitValues['cid'];
$mid = $submitValues['membership_record'];
$reference_number = $submitValues['reference_number'];
$cr_id = $submitValues['contribution_recur_record'];
$params = sprintf('cid=%d&mid=%d&cr_id=%d&reference_number=%s', $cid, $mid, $cr_id, $reference_number);
$url = CRM_Utils_System::url('civicrm/smartdebit/reconciliation/fix-contact-rec-confirm', $params);
CRM_Utils_System::redirect($url);
parent::postProcess();
}
开发者ID:priyankakaran26,项目名称:uk.co.vedaconsulting.module.smartdebit_reconciliation,代码行数:12,代码来源:MembershipRecurDetails.php