• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CRM_Contribute_Form_Task类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CRM_Contribute_Form_Task的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Contribute_Form_Task类的具体用法?PHP CRM_Contribute_Form_Task怎么用?PHP CRM_Contribute_Form_Task使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CRM_Contribute_Form_Task类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: preProcess

 /**
  * Build all the data structures needed to build the form.
  *
  * @param
  *
  * @return void
  */
 public function preProcess()
 {
     //special case for custom search, directly give option to download csv file
     $customSearchID = $this->get('customSearchID');
     if ($customSearchID) {
         CRM_Export_BAO_Export::exportCustom($this->get('customSearchClass'), $this->get('formValues'), $this->get(CRM_Utils_Sort::SORT_ORDER));
     }
     $this->_selectAll = FALSE;
     $this->_exportMode = self::CONTACT_EXPORT;
     $this->_componentIds = array();
     $this->_componentClause = NULL;
     // get the submitted values based on search
     if ($this->_action == CRM_Core_Action::ADVANCED) {
         $values = $this->controller->exportValues('Advanced');
     } elseif ($this->_action == CRM_Core_Action::PROFILE) {
         $values = $this->controller->exportValues('Builder');
     } elseif ($this->_action == CRM_Core_Action::COPY) {
         $values = $this->controller->exportValues('Custom');
     } else {
         // we need to determine component export
         $stateMachine = $this->controller->getStateMachine();
         $formName = CRM_Utils_System::getClassName($stateMachine);
         $componentName = explode('_', $formName);
         $components = array('Contribute', 'Member', 'Event', 'Pledge', 'Case', 'Grant', 'Activity');
         if (in_array($componentName[1], $components)) {
             switch ($componentName[1]) {
                 case 'Contribute':
                     $this->_exportMode = self::CONTRIBUTE_EXPORT;
                     break;
                 case 'Member':
                     $this->_exportMode = self::MEMBER_EXPORT;
                     break;
                 case 'Event':
                     $this->_exportMode = self::EVENT_EXPORT;
                     break;
                 case 'Pledge':
                     $this->_exportMode = self::PLEDGE_EXPORT;
                     break;
                 case 'Case':
                     $this->_exportMode = self::CASE_EXPORT;
                     break;
                 case 'Grant':
                     $this->_exportMode = self::GRANT_EXPORT;
                     break;
                 case 'Activity':
                     $this->_exportMode = self::ACTIVITY_EXPORT;
                     break;
             }
             $className = "CRM_{$componentName[1]}_Form_Task";
             $className::preProcessCommon($this, TRUE);
             $values = $this->controller->exportValues('Search');
         } else {
             $values = $this->controller->exportValues('Basic');
         }
     }
     $count = 0;
     $this->_matchingContacts = FALSE;
     if (CRM_Utils_Array::value('radio_ts', $values) == 'ts_sel') {
         foreach ($values as $key => $value) {
             if (strstr($key, 'mark_x')) {
                 $count++;
             }
             if ($count > 2) {
                 $this->_matchingContacts = TRUE;
                 break;
             }
         }
     }
     $componentMode = $this->get('component_mode');
     switch ($componentMode) {
         case 2:
             CRM_Contribute_Form_Task::preProcessCommon($this, TRUE);
             $this->_exportMode = self::CONTRIBUTE_EXPORT;
             $componentName = array('', 'Contribute');
             break;
         case 3:
             CRM_Event_Form_Task::preProcessCommon($this, TRUE);
             $this->_exportMode = self::EVENT_EXPORT;
             $componentName = array('', 'Event');
             break;
         case 4:
             CRM_Activity_Form_Task::preProcessCommon($this, TRUE);
             $this->_exportMode = self::ACTIVITY_EXPORT;
             $componentName = array('', 'Activity');
             break;
         case 5:
             CRM_Member_Form_Task::preProcessCommon($this, TRUE);
             $this->_exportMode = self::MEMBER_EXPORT;
             $componentName = array('', 'Member');
             break;
         case 6:
             CRM_Case_Form_Task::preProcessCommon($this, TRUE);
             $this->_exportMode = self::CASE_EXPORT;
//.........这里部分代码省略.........
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:101,代码来源:Select.php


示例2: postProcess

 /**
  * Process the form after the input has been submitted and validated.
  *
  * @param CRM_Contribute_Form_Task $form
  */
 public static function postProcess(&$form)
 {
     $formValues = $form->controller->exportValues($form->getName());
     list($formValues, $categories, $html_message, $messageToken, $returnProperties) = self::processMessageTemplate($formValues);
     $isPDF = FALSE;
     $emailParams = array();
     if (!empty($formValues['email_options'])) {
         $returnProperties['email'] = $returnProperties['on_hold'] = $returnProperties['is_deceased'] = $returnProperties['do_not_email'] = 1;
         $emailParams = array('subject' => $formValues['subject']);
         // We need display_name for emailLetter() so add to returnProperties here
         $returnProperties['display_name'] = 1;
         if (stristr($formValues['email_options'], 'pdfemail')) {
             $isPDF = TRUE;
         }
     }
     // update dates ?
     $receipt_update = isset($formValues['receipt_update']) ? $formValues['receipt_update'] : FALSE;
     $thankyou_update = isset($formValues['thankyou_update']) ? $formValues['thankyou_update'] : FALSE;
     $nowDate = date('YmdHis');
     $receipts = $thanks = $emailed = 0;
     $updateStatus = '';
     $task = 'CRM_Contribution_Form_Task_PDFLetterCommon';
     $realSeparator = ', ';
     $tableSeparators = array('td' => '</td><td>', 'tr' => '</td></tr><tr><td>');
     //the original thinking was mutliple options - but we are going with only 2 (comma & td) for now in case
     // there are security (& UI) issues we need to think through
     if (isset($formValues['group_by_separator'])) {
         if (in_array($formValues['group_by_separator'], array('td', 'tr'))) {
             $realSeparator = $tableSeparators[$formValues['group_by_separator']];
         } elseif ($formValues['group_by_separator'] == 'br') {
             $realSeparator = "<br />";
         }
     }
     $separator = '****~~~~';
     // a placeholder in case the separator is common in the string - e.g ', '
     $validated = FALSE;
     $groupBy = $formValues['group_by'];
     // skip some contacts ?
     $skipOnHold = isset($form->skipOnHold) ? $form->skipOnHold : FALSE;
     $skipDeceased = isset($form->skipDeceased) ? $form->skipDeceased : TRUE;
     $contributionIDs = $form->getVar('_contributionIds');
     if ($form->_includesSoftCredits) {
         //@todo - comment on what is stored there
         $contributionIDs = $form->getVar('_contributionContactIds');
     }
     list($contributions, $contacts) = self::buildContributionArray($groupBy, $contributionIDs, $returnProperties, $skipOnHold, $skipDeceased, $messageToken, $task, $separator, $form->_includesSoftCredits);
     $html = array();
     foreach ($contributions as $contributionId => $contribution) {
         $contact =& $contacts[$contribution['contact_id']];
         $grouped = $groupByID = 0;
         if ($groupBy) {
             $groupByID = empty($contribution[$groupBy]) ? 0 : $contribution[$groupBy];
             $contribution = $contact['combined'][$groupBy][$groupByID];
             $grouped = TRUE;
         }
         self::assignCombinedContributionValues($contact, $contributions, $groupBy, $groupByID);
         if (empty($groupBy) || empty($contact['is_sent'][$groupBy][$groupByID])) {
             if (!$validated && in_array($realSeparator, $tableSeparators) && !self::isValidHTMLWithTableSeparator($messageToken, $html_message)) {
                 $realSeparator = ', ';
                 CRM_Core_Session::setStatus(ts('You have selected the table cell separator, but one or more token fields are not placed inside a table cell. This would result in invalid HTML, so comma separators have been used instead.'));
             }
             $validated = TRUE;
             $html[$contributionId] = str_replace($separator, $realSeparator, self::resolveTokens($html_message, $contact, $contribution, $messageToken, $categories, $grouped, $separator));
             $contact['is_sent'][$groupBy][$groupByID] = TRUE;
             if (!empty($formValues['email_options'])) {
                 if (self::emailLetter($contact, $html[$contributionId], $isPDF, $formValues, $emailParams)) {
                     $emailed++;
                     if (!stristr($formValues['email_options'], 'both')) {
                         unset($html[$contributionId]);
                     }
                 }
             }
         }
         // update dates (do it for each contribution including grouped recurring contribution)
         //@todo - the 2 calls below bypass all hooks. Using the api would possibly be slower than one call but not than 2
         if ($receipt_update) {
             $result = CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Contribution', $contributionId, 'receipt_date', $nowDate);
             if ($result) {
                 $receipts++;
             }
         }
         if ($thankyou_update) {
             $result = CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Contribution', $contributionId, 'thankyou_date', $nowDate);
             if ($result) {
                 $thanks++;
             }
         }
     }
     //createActivities requires both $form->_contactIds and $contacts -
     //@todo - figure out why
     $form->_contactIds = array_keys($contacts);
     self::createActivities($form, $html_message, $form->_contactIds);
     if (!empty($html)) {
         CRM_Utils_PDF_Utils::html2pdf($html, "CiviLetter.pdf", FALSE, $formValues);
     }
//.........这里部分代码省略.........
开发者ID:nielosz,项目名称:civicrm-core,代码行数:101,代码来源:PDFLetterCommon.php


示例3: buildContributionArray

 /**
  * Generate the contribution array from the form, we fill in the contact details and determine any aggregation
  * around contact_id of contribution_recur_id
  *
  * @param string $groupBy
  * @param CRM_Contribute_Form_Task $form
  * @param array $returnProperties
  * @param bool $skipOnHold
  * @param bool $skipDeceased
  * @param array $messageToken
  * @param string $task
  * @param string $separator
  *
  * @return array
  */
 public static function buildContributionArray($groupBy, $form, $returnProperties, $skipOnHold, $skipDeceased, $messageToken, $task, $separator)
 {
     $contributions = $contacts = $notSent = array();
     $contributionIDs = $form->getVar('_contributionIds');
     if ($form->_includesSoftCredits) {
         //@todo - comment on what is stored there
         $contributionIDs = $form->getVar('_contributionContactIds');
     }
     foreach ($contributionIDs as $item => $contributionId) {
         // get contribution information
         $contribution = CRM_Utils_Token::getContributionTokenDetails(array('contribution_id' => $contributionId), $returnProperties, NULL, $messageToken, $task);
         $contribution = $contributions[$contributionId] = $contribution[$contributionId];
         if ($form->_includesSoftCredits) {
             //@todo find out why this happens & add comments
             list($contactID) = explode('-', $item);
             $contactID = (int) $contactID;
         } else {
             $contactID = $contribution['contact_id'];
         }
         if (!isset($contacts[$contactID])) {
             list($contact) = CRM_Utils_Token::getTokenDetails(array('contact_id' => $contactID), $returnProperties, $skipOnHold, $skipDeceased, NULL, $messageToken, $task);
             $contacts[$contactID] = $contact[$contactID];
             $contacts[$contactID]['contact_aggregate'] = 0;
             $contacts[$contactID]['combined'] = $contacts[$contactID]['contribution_ids'] = array();
         }
         $contacts[$contactID]['contact_aggregate'] += $contribution['total_amount'];
         $groupByID = empty($contribution[$groupBy]) ? 0 : $contribution[$groupBy];
         $contacts[$contactID]['contribution_ids'][$groupBy][$groupByID][$contributionId] = TRUE;
         if (!isset($contacts[$contactID]['combined'][$groupBy]) || !isset($contacts[$contactID]['combined'][$groupBy][$groupByID])) {
             $contacts[$contactID]['combined'][$groupBy][$groupByID] = $contribution;
             $contacts[$contactID]['aggregates'][$groupBy][$groupByID] = $contribution['total_amount'];
         } else {
             $contacts[$contactID]['combined'][$groupBy][$groupByID] = self::combineContributions($contacts[$contactID]['combined'][$groupBy][$groupByID], $contribution, $separator);
             $contacts[$contactID]['aggregates'][$groupBy][$groupByID] += $contribution['total_amount'];
         }
     }
     return array($contributions, $contacts);
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:53,代码来源:PDFLetterCommon.php


示例4: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @param
  * @return void
  * @access public
  */
 function preProcess()
 {
     //special case for custom search, directly give option to download csv file
     $customSearchID = $this->get('customSearchID');
     if ($customSearchID) {
         require_once 'CRM/Export/BAO/Export.php';
         CRM_Export_BAO_Export::exportCustom($this->get('customSearchClass'), $this->get('formValues'), $this->get(CRM_Utils_Sort::SORT_ORDER));
     }
     $this->_selectAll = false;
     $this->_exportMode = self::CONTACT_EXPORT;
     // get the submitted values based on search
     if ($this->_action == CRM_Core_Action::ADVANCED) {
         $values = $this->controller->exportValues('Advanced');
     } else {
         if ($this->_action == CRM_Core_Action::PROFILE) {
             $values = $this->controller->exportValues('Builder');
         } else {
             if ($this->_action == CRM_Core_Action::COPY) {
                 $values = $this->controller->exportValues('Custom');
             } else {
                 // we need to determine component export
                 $stateMachine =& $this->controller->getStateMachine();
                 $formName = CRM_Utils_System::getClassName($stateMachine);
                 $componentName = explode('_', $formName);
                 $components = array('Contribute', 'Member', 'Event', 'Pledge', 'Case', 'Grant', 'Activity');
                 if (in_array($componentName[1], $components)) {
                     eval('$this->_exportMode = self::' . strtoupper($componentName[1]) . '_EXPORT;');
                     require_once "CRM/{$componentName[1]}/Form/Task.php";
                     eval('CRM_' . $componentName[1] . '_Form_Task::preProcessCommon( $this, true );');
                     $values = $this->controller->exportValues('Search');
                 } else {
                     $values = $this->controller->exportValues('Basic');
                 }
             }
         }
     }
     $componentMode = $this->get('component_mode');
     switch ($componentMode) {
         case 2:
             require_once "CRM/Contribute/Form/Task.php";
             CRM_Contribute_Form_Task::preProcessCommon($this, true);
             $this->_exportMode = self::CONTRIBUTE_EXPORT;
             $componentName = array('', 'Contribute');
             break;
         case 3:
             require_once "CRM/Event/Form/Task.php";
             CRM_Event_Form_Task::preProcessCommon($this, true);
             $this->_exportMode = self::EVENT_EXPORT;
             $componentName = array('', 'Event');
             break;
         case 4:
             require_once "CRM/Activity/Form/Task.php";
             CRM_Activity_Form_Task::preProcessCommon($this, true);
             $this->_exportMode = self::ACTIVITY_EXPORT;
             $componentName = array('', 'Activity');
             break;
     }
     require_once 'CRM/Contact/Task.php';
     $this->_task = $values['task'];
     if ($this->_exportMode == self::CONTACT_EXPORT) {
         $contactTasks = CRM_Contact_Task::taskTitles();
         $taskName = $contactTasks[$this->_task];
         require_once "CRM/Contact/Form/Task.php";
         CRM_Contact_Form_Task::preProcessCommon($this, true);
     } else {
         $this->assign('taskName', "Export {$componentName['1']}");
         eval('$componentTasks = CRM_' . $componentName[1] . '_Task::tasks();');
         $taskName = $componentTasks[$this->_task];
     }
     if ($this->_componentTable) {
         $query = "\nSELECT count(*)\nFROM   {$this->_componentTable}\n";
         $totalSelectedRecords = CRM_Core_DAO::singleValueQuery($query);
     } else {
         $totalSelectedRecords = count($this->_componentIds);
     }
     $this->assign('totalSelectedRecords', $totalSelectedRecords);
     $this->assign('taskName', $taskName);
     // all records actions = save a search
     if ($values['radio_ts'] == 'ts_all' || $this->_task == CRM_Contact_Task::SAVE_SEARCH) {
         $this->_selectAll = true;
         $this->assign('totalSelectedRecords', $this->get('rowCount'));
     }
     $this->set('componentIds', $this->_componentIds);
     $this->set('selectAll', $this->_selectAll);
     $this->set('exportMode', $this->_exportMode);
     $this->set('componentClause', $this->_componentClause);
     $this->set('componentTable', $this->_componentTable);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:95,代码来源:Select.php


示例5: preProcess

 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
     if ($id) {
         $this->_contributionIds = array($id);
         $this->_componentClause = " civicrm_contribution.id IN ( {$id} ) ";
         $this->_single = TRUE;
         $this->assign('totalSelectedContributions', 1);
     } else {
         parent::preProcess();
     }
     // check that all the contribution ids have pending status
     $query = "\nSELECT count(*)\nFROM   civicrm_contribution\nWHERE  contribution_status_id != 1\nAND    {$this->_componentClause}";
     $count = CRM_Core_DAO::singleValueQuery($query);
     if ($count != 0) {
         CRM_Core_Error::statusBounce("Please select only online contributions with Completed status.");
     }
     // we have all the contribution ids, so now we get the contact ids
     parent::setContactIDs();
     $this->assign('single', $this->_single);
     $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
     $urlParams = 'force=1';
     if (CRM_Utils_Rule::qfKey($qfKey)) {
         $urlParams .= "&qfKey={$qfKey}";
     }
     $url = CRM_Utils_System::url('civicrm/contribute/search', $urlParams);
     $breadCrumb = array(array('url' => $url, 'title' => ts('Search Results')));
     CRM_Utils_System::appendBreadCrumb($breadCrumb);
     CRM_Utils_System::setTitle(ts('Print Contribution Receipts'));
 }
开发者ID:rajeshrhino,项目名称:civicrm-core,代码行数:35,代码来源:PDF.php


示例6: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     /*
      * initialize the task and row fields
      */
     parent::preProcess();
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:13,代码来源:Batch.php


示例7: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     $id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false);
     if ($id) {
         $this->_contributionIds = array($id);
         $this->_componentClause = " civicrm_contribution.id IN ( {$id} ) ";
         $this->_single = true;
         $this->assign('totalSelectedContributions', 1);
     } else {
         parent::preProcess();
     }
     // check that all the contribution ids have pending status
     $query = "\nSELECT count(*)\nFROM   civicrm_contribution\nWHERE  contribution_status_id != 2\nAND    {$this->_componentClause}";
     $count = CRM_Core_DAO::singleValueQuery($query, CRM_Core_DAO::$_nullArray);
     if ($count != 0) {
         CRM_Core_Error::statusBounce(ts('Please select only online contributions with Pending status.'));
     }
     // ensure that all contributions are generated online by pay later
     $query = "\nSELECT DISTINCT( source ) as source\nFROM   civicrm_contribution\nWHERE  {$this->_componentClause}";
     $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
     while ($dao->fetch()) {
         if (strpos($dao->source, ts('Online Contribution')) === false && strpos($dao->source, ts('Online Event Registration')) === false) {
             CRM_Core_Error::statusBounce("<strong>Update Pending Contribution Status</strong> can only be used for pending online contributions (made using the 'Pay Later' option). The Source for these contributions starts with 'Online ...'. Please de-select any offline contributions and try again.");
         }
     }
     // we have all the contribution ids, so now we get the contact ids
     parent::setContactIDs();
     $this->assign('single', $this->_single);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:35,代码来源:Status.php


示例8: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
     parent::preProcess();
     // we have all the contribution ids, so now we get the contact ids
     parent::setContactIDs();
     $this->assign('single', $this->_single);
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:14,代码来源:Email.php


示例9: preProcess

 /**
  * Build all the data structures needed to build the form.
  */
 public function preProcess()
 {
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviContribute', CRM_Core_Action::DELETE)) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
     }
     parent::preProcess();
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:11,代码来源:Delete.php


示例10: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preprocess();
     // set print view, so that print templates are called
     $this->controller->setPrint(true);
     // create the selector, controller and run - store results in session
     $fv = $this->get('formValues');
     $selector =& new CRM_Contribute_Selector_Search($fv, $this->_action, $this->_contributionClause);
     $controller =& new CRM_Core_Selector_Controller($selector, null, null, CRM_CORE_ACTION_VIEW, $this, CRM_CORE_SELECTOR_CONTROLLER_SCREEN);
     $controller->setEmbedded(true);
     $controller->run();
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:18,代码来源:Print.php


示例11: preProcess

 /**
  * Build all the data structures needed to build the form.
  */
 public function preProcess()
 {
     // initialize the task and row fields
     parent::preProcess();
     //get the contact read only fields to display.
     $readOnlyFields = array_merge(array('sort_name' => ts('Name')), CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'contact_autocomplete_options', TRUE, NULL, FALSE, 'name', TRUE));
     //get the read only field data.
     $returnProperties = array_fill_keys(array_keys($readOnlyFields), 1);
     $contactDetails = CRM_Contact_BAO_Contact_Utils::contactDetails($this->_contributionIds, 'CiviContribute', $returnProperties);
     $this->assign('contactDetails', $contactDetails);
     $this->assign('readOnlyFields', $readOnlyFields);
 }
开发者ID:saurabhbatra96,项目名称:civicrm-core,代码行数:15,代码来源:Batch.php


示例12: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, false);
     if ($cid) {
         CRM_Contact_Form_Task_EmailCommon::preProcessSingle($this, $cid);
     } else {
         parent::preProcess();
         // we have all the contribution ids, so now we get the contact ids
         parent::setContactIDs();
     }
     $this->assign('single', $this->_single);
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:18,代码来源:Email.php


示例13: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     $rows = array();
     // display name and contribution details of all selected contacts
     $contribIDs = implode(',', $this->_contributionIds);
     $query = "\n    SELECT co.total_amount as amount,\n           co.receive_date as receive_date,\n           co.source       as source,\n           ct.display_name as display_name\n      FROM civicrm_contribution co\nINNER JOIN civicrm_contact ct ON ( co.contact_id = ct.id )\n     WHERE co.id IN ( {$contribIDs} )";
     $dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
     while ($dao->fetch()) {
         $rows[] = array('display_name' => $dao->display_name, 'amount' => $dao->amount, 'source' => $dao->source, 'receive_date' => $dao->receive_date);
     }
     $this->assign('rows', $rows);
 }
开发者ID:hguru,项目名称:224Civi,代码行数:19,代码来源:SearchTaskHookSample.php


示例14: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     require_once 'CRM/Civigiftaid/Utils/Contribution.php';
     list($total, $toRemove, $notInBatch, $alreadySubmited) = CRM_Civigiftaid_Utils_Contribution::_validationRemoveContributionFromBatch($this->_contributionIds);
     $this->assign('selectedContributions', $total);
     $this->assign('totalToRemoveContributions', count($toRemove));
     $this->assign('notInBatchContributions', count($notInBatch));
     $this->assign('alreadySubmitedContributions', count($alreadySubmited));
     $contributionsToRemoveRows = CRM_Civigiftaid_Utils_Contribution::getContributionDetails($toRemove);
     $this->assign('contributionsToRemoveRows', $contributionsToRemoveRows);
     $contributionsAlreadySubmitedRows = CRM_Civigiftaid_Utils_Contribution::getContributionDetails($alreadySubmited);
     $this->assign('contributionsAlreadySubmitedRows', $contributionsAlreadySubmitedRows);
     $contributionsNotInBatchRows = CRM_Civigiftaid_Utils_Contribution::getContributionDetails($notInBatch);
     $this->assign('contributionsNotInBatchRows', $contributionsNotInBatchRows);
 }
开发者ID:nishant-bhorodia,项目名称:uk.co.compucorp.civicrm.giftaid,代码行数:22,代码来源:RemoveFromBatch.php


示例15: postProcess

 function postProcess()
 {
     $session = CRM_Core_Session::singleton();
     $userContext = $session->readUserContext();
     $values = $this->exportValues();
     CRM_Donrec_Form_Task_Rebook::rebook($this->_contributionIds, trim($values['contactId']), $userContext);
     parent::postProcess();
     // finally, redirect to original contact's contribution overview
     $origin_contact_id = CRM_Donrec_Form_Task_Rebook::checkSameContact($this->_contributionIds, NULL);
     if (!empty($origin_contact_id)) {
         $url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$origin_contact_id}&selectedChild=contribute");
     } else {
         $url = CRM_Utils_System::url('civicrm', "");
     }
     CRM_Utils_System::redirect($url);
 }
开发者ID:systopia,项目名称:de.systopia.donrec,代码行数:16,代码来源:RebookTask.php


示例16: preProcess

 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     parent::preprocess();
     // set print view, so that print templates are called
     $this->controller->setPrint(1);
     // get the formatted params
     $queryParams = $this->get('queryParams');
     $sortID = NULL;
     if ($this->get(CRM_Utils_Sort::SORT_ID)) {
         $sortID = CRM_Utils_Sort::sortIDValue($this->get(CRM_Utils_Sort::SORT_ID), $this->get(CRM_Utils_Sort::SORT_DIRECTION));
     }
     $selector = new CRM_Contribute_Selector_Search($queryParams, $this->_action, $this->_componentClause);
     $controller = new CRM_Core_Selector_Controller($selector, NULL, $sortID, CRM_Core_Action::VIEW, $this, CRM_Core_Selector_Controller::SCREEN);
     $controller->setEmbedded(TRUE);
     $controller->run();
 }
开发者ID:kidaa30,项目名称:yes,代码行数:21,代码来源:Print.php


示例17: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     /*
      * initialize the task and row fields
      */
     parent::preProcess();
     //get the contact read only fields to display.
     require_once 'CRM/Core/BAO/Preferences.php';
     $readOnlyFields = array_merge(array('sort_name' => ts('Name')), CRM_Core_BAO_Preferences::valueOptions('contact_autocomplete_options', true, null, false, 'name', true));
     //get the read only field data.
     $returnProperties = array_fill_keys(array_keys($readOnlyFields), 1);
     require_once 'CRM/Contact/BAO/Contact/Utils.php';
     $contactDetails = CRM_Contact_BAO_Contact_Utils::contactDetails($this->_contributionIds, 'CiviContribute', $returnProperties);
     $this->assign('contactDetails', $contactDetails);
     $this->assign('readOnlyFields', $readOnlyFields);
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:22,代码来源:Batch.php


示例18: preProcess

 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     $this->skipOnHold = $this->skipDeceased = FALSE;
     CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this);
     // store case id if present
     $this->_caseId = CRM_Utils_Request::retrieve('caseid', 'Positive', $this, FALSE);
     // retrieve contact ID if this is 'single' mode
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE);
     $this->_activityId = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
     if ($cid) {
         CRM_Contact_Form_Task_PDFLetterCommon::preProcessSingle($this, $cid);
         $this->_single = TRUE;
         $this->_cid = $cid;
     } else {
         parent::preProcess();
     }
     $this->assign('single', $this->_single);
 }
开发者ID:vakeesan26,项目名称:civicrm-core,代码行数:23,代码来源:PDFLetter.php


示例19: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     require_once 'GiftAid/Utils/Contribution.php';
     list($total, $added, $alreadyAdded, $notValid) = GiftAid_Utils_Contribution::_validateContributionToBatch($this->_contributionIds);
     $this->assign('selectedContributions', $total);
     $this->assign('totalAddedContributions', count($added));
     $this->assign('alreadyAddedContributions', count($alreadyAdded));
     $this->assign('notValidContributions', count($notValid));
     // get details of contribution that will be added to this batch.
     $contributionsAddedRows = array();
     $contributionsAddedRows = GiftAid_Utils_Contribution::getContributionDetails($added);
     $this->assign('contributionsAddedRows', $contributionsAddedRows);
     // get details of contribution thatare already added to this batch.
     $contributionsAlreadyAddedRows = array();
     $contributionsAlreadyAddedRows = GiftAid_Utils_Contribution::getContributionDetails($alreadyAdded);
     $this->assign('contributionsAlreadyAddedRows', $contributionsAlreadyAddedRows);
 }
开发者ID:rajeshrhino,项目名称:civicrm_giftaid,代码行数:24,代码来源:AddToGiftAid.php


示例20: preProcess

 /**
  * Build all the data structures needed to build the form.
  */
 public function preProcess()
 {
     // initialize the task and row fields
     parent::preProcess();
     $session = CRM_Core_Session::singleton();
     $this->_userContext = $session->readUserContext();
     CRM_Utils_System::setTitle(ts('Batch Update Contributions Via Profile'));
     $validate = FALSE;
     //validations
     if (count($this->_contributionIds) > $this->_maxContributions) {
         CRM_Core_Session::setStatus(ts("The maximum number of contributions you can select for Batch update is %1. You have selected %2. Please select fewer contributions from your search results and try again.", array(1 => $this->_maxContributions, 2 => count($this->_contributionIds))), ts('Batch Update Error'), 'error');
         $validate = TRUE;
     }
     // than redirect
     if ($validate) {
         CRM_Utils_System::redirect($this->_userContext);
     }
 }
开发者ID:nganivet,项目名称:civicrm-core,代码行数:21,代码来源:PickProfile.php



注:本文中的CRM_Contribute_Form_Task类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CRM_Contribute_PseudoConstant类代码示例发布时间:2022-05-20
下一篇:
PHP CRM_Contribute_Form_Contribution_Confirm类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap