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

PHP CRM_Contact_Form_Task类代码示例

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

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



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

示例1: preProcess

 public function preProcess()
 {
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE);
     CRM_Contact_Form_Task_SMSCommon::preProcessProvider($this);
     if (!$cid && $this->_context != 'standalone') {
         parent::preProcess();
     }
     $this->assign('single', $this->_single);
     if (CRM_Core_Permission::check('administer CiviCRM')) {
         $this->assign('isAdmin', 1);
     }
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:13,代码来源:SMS.php


示例2: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this);
     // store case id if present
     $this->_caseId = CRM_Utils_Request::retrieve('caseid', 'Positive', $this, false);
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, false);
     if ($cid) {
         CRM_Contact_Form_Task_PDFLetterCommon::preProcessSingle($this, $cid);
     } else {
         parent::preProcess();
     }
     $this->assign('single', $this->_single);
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:19,代码来源:PDF.php


示例3: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     // store case id if present
     $this->_caseId = CRM_Utils_Request::retrieve('caseid', 'Positive', $this, false);
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, false);
     if ($cid || $this->_context == 'standalone') {
         CRM_Contact_Form_Task_EmailCommon::preProcessSingle($this, $cid);
     } else {
         parent::preProcess();
     }
     $this->assign('single', $this->_single);
     require_once 'CRM/Core/Permission.php';
     if (CRM_Core_Permission::check('administer CiviCRM')) {
         $this->assign('isAdmin', 1);
     }
 }
开发者ID:bhirsch,项目名称:voipdev,代码行数:23,代码来源:Email.php


示例4: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access 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:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:24,代码来源:PDF.php


示例5: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     // store case id if present
     $this->_caseId = CRM_Utils_Request::retrieve('caseid', 'Positive', $this, false);
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, false);
     CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
     if (!$cid && $this->_context != 'standalone') {
         parent::preProcess();
     }
     //early prevent, CRM-6209
     if (count($this->_contactIds) > CRM_Contact_Form_Task_EmailCommon::MAX_EMAILS_KILL_SWITCH) {
         CRM_Core_Error::statusBounce(ts('Please do not use this task to send a lot of emails (greater than %1). We recommend using CiviMail instead.', array(1 => CRM_Contact_Form_Task_EmailCommon::MAX_EMAILS_KILL_SWITCH)));
     }
     $this->assign('single', $this->_single);
     require_once 'CRM/Core/Permission.php';
     if (CRM_Core_Permission::check('administer CiviCRM')) {
         $this->assign('isAdmin', 1);
     }
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:26,代码来源:Email.php


示例6: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     require_once 'CRM/Utils/Rule.php';
     $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
     $urlParams = 'force=1';
     if (CRM_Utils_Rule::qfKey($qfKey)) {
         $urlParams .= '&qfKey=' . $qfKey;
     }
     $session = CRM_Core_Session::singleton();
     $url = CRM_Utils_System::url('civicrm/contact/search/custom', $urlParams);
     $session->replaceUserContext($url);
     //get the survey id from user submitted values.
     $this->_surveyId = CRM_Utils_Array::value('survey_id', $this->get('formValues'));
     $isHeld = CRM_Utils_Array::value('status_id', $this->get('formValues'));
     if (!$this->_surveyId || !$isHeld) {
         CRM_Core_Error::statusBounce(ts("Please search with 'Is Held' and 'Survey Id' filters to apply this action."));
     }
     $session = CRM_Core_Session::singleton();
     if (empty($this->_contactIds) || !$session->get('userID')) {
         CRM_Core_Error::statusBounce(ts("Could not find contacts for release voters resevation Or Missing Interviewer contact."));
     }
     $this->_interviewerId = $session->get('userID');
     $surveyDetails = array();
     $params = array('id' => $this->_surveyId);
     $this->_surveyDetails = CRM_Campaign_BAO_Survey::retrieve($params, $surveyDetails);
     $numVoters = CRM_Core_DAO::singleValueQuery("SELECT COUNT(*) FROM " . self::ACTIVITY_SURVEY_DETAIL_TABLE . " WHERE status_id = 'H' AND survey_id = %1 AND interviewer_id = %2", array(1 => array($this->_surveyId, 'Integer'), 2 => array($this->_interviewerId, 'Integer')));
     if (!isset($numVoters) || $numVoters < 1) {
         CRM_Core_Error::statusBounce(ts("All voters held by you are already released for this survey."));
     }
     $this->assign('surveyTitle', $surveyDetails['title']);
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:38,代码来源:ReleaseVoters.php


示例7: postProcess

 function postProcess()
 {
     $values = $this->exportValues();
     // find/determine household name
     if ($values['hh_option'] == 'new') {
         // extract the name:
         if ($values['household_name_pattern'] == 'custom') {
             $household_name = $values['household_name'];
         } else {
             $household_name = $values['household_name_pattern'];
         }
         $household = civicrm_api3('Contact', 'create', array('contact_type' => 'Household', 'household_name' => $household_name));
         $household_id = $household['id'];
     } elseif ($values['hh_option'] == 'existing') {
         $household_id = (int) $values['existing_household'];
     } else {
         // has to be the selected_XXX preselected household change
         $household_id = (int) substr($values['hh_option'], 9);
     }
     // find contact_ids
     $contact_ids = $values['hh_contacts'];
     // ...and pass the ball to the merge view
     $mergeview_url = CRM_Utils_System::url('civicrm/household/mergeview', "hid={$household_id}&oids={$contact_ids}");
     CRM_Utils_System::redirect($mergeview_url);
     parent::postProcess();
 }
开发者ID:systopia,项目名称:de.systopia.householdmerge,代码行数:26,代码来源:Merge.php


示例8: 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) {
         // not sure why this is needed :(
         // also add the cid params to the Menu array
         CRM_Core_Menu::addParam('cid', $cid);
         // create menus ..
         $startWeight = CRM_Core_Menu::getMaxWeight('civicrm/contact/view');
         $startWeight++;
         CRM_Core_BAO_CustomGroup::addMenuTabs(CRM_Contact_BAO_Contact::getContactType($cid), 'civicrm/contact/view/cd', $startWeight);
         $this->_contactIds = array($cid);
         $this->_single = true;
         $smsNumbers = CRM_Contact_BAO_Contact::allPhones($cid, 'Mobile');
         $this->_emails = array();
         $toName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $cid, 'display_name');
         foreach ($smsNumbers as $number => $item) {
             $this->_smsNumbers[$number] = '"' . $toName . '" <' . $number . '> ' . $item['locationType'];
             if ($item['is_primary']) {
                 $this->_smsNumbers[$number] .= ' ' . ts('(preferred)');
             }
             $this->_smsNumbers[$number] = htmlspecialchars($this->_emails[$email]);
         }
     } else {
         parent::preProcess();
     }
     $this->assign('single', $this->_single);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:34,代码来源:SMS.php


示例9: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     if (CRM_Core_BAO_MailSettings::defaultDomain() == "EXAMPLE.ORG") {
         CRM_Core_Error::fatal(ts('The <a href="%1">default mailbox</a> has not been configured. You will find <a href="%2">more info in our online user and administrator guide.</a>', array(1 => CRM_Utils_System::url('civicrm/admin/mailSettings', 'reset=1'), 2 => "http://book.civicrm.org/user/advanced-configuration/email-system-configuration/")));
     }
     $this->_mailingID = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE, NULL);
     // when user come from search context.
     $this->_searchBasedMailing = CRM_Contact_Form_Search::isSearchContext($this->get('context'));
     if ($this->_searchBasedMailing) {
         $searchParams = $this->controller->exportValues();
         // number of records that were selected - All or Few.
         $this->_resultSelectOption = $searchParams['radio_ts'];
         if (CRM_Utils_Array::value('task', $searchParams) == 20) {
             parent::preProcess();
         }
     }
     $session = CRM_Core_Session::singleton();
     if ($this->_searchBasedMailing) {
         $config = CRM_Core_Config::singleton();
         $path = CRM_Utils_Array::value($config->userFrameworkURLVar, $_GET);
         $qfKey = CRM_Utils_Array::value('qfKey', $_GET);
         if ($qfKey) {
             $session->pushUserContext(CRM_Utils_System::url($path, "qfKey={$qfKey}"));
         } else {
             $session->pushUserContext(CRM_Utils_System::url('civicrm/mailing', 'reset=1'));
         }
     } elseif (strpos($session->readUserContext(), 'civicrm/mailing') === FALSE) {
         // use previous context unless mailing is not schedule, CRM-4290
         $session->pushUserContext(CRM_Utils_System::url('civicrm/mailing', 'reset=1'));
     }
 }
开发者ID:JSProffitt,项目名称:civicrm-website-org,代码行数:36,代码来源:Group.php


示例10: 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);
     $this->assign('id', $this->get('id'));
     $this->assign('pageTitle', ts('CiviCRM Contact Listing'));
     $params = $this->get('queryParams');
     if (!empty($this->_contactIds)) {
         //using _contactIds field for creating params for query so that multiple selections on multiple pages
         //can be printed.
         foreach ($this->_contactIds as $contactId) {
             $params[] = array(CRM_Core_Form::CB_PREFIX . $contactId, '=', 1, 0, 0);
         }
     }
     // create the selector, controller and run - store results in session
     $fv = $this->get('formValues');
     $returnProperties = $this->get('returnProperties');
     $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));
     }
     $includeContactIds = FALSE;
     if ($fv['radio_ts'] == 'ts_sel') {
         $includeContactIds = TRUE;
     }
     $selectorName = $this->controller->selectorName();
     require_once str_replace('_', DIRECTORY_SEPARATOR, $selectorName) . '.php';
     $returnP = isset($returnPropeties) ? $returnPropeties : "";
     $customSearchClass = $this->get('customSearchClass');
     $selector = new $selectorName($customSearchClass, $fv, $params, $returnP, $this->_action, $includeContactIds);
     $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:BorislavZlatanov,项目名称:civicrm-core,代码行数:40,代码来源:Print.php


示例11: 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(1);
     $this->assign('id', $this->get('id'));
     $this->assign('pageTitle', ts('CiviCRM Contact Listing'));
     // create the selector, controller and run - store results in session
     $fv = $this->get('formValues');
     $params = $this->get('queryParams');
     $returnProperties = $this->get('returnProperties');
     $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));
     }
     $includeContactIds = false;
     if ($fv['radio_ts'] == 'ts_sel') {
         $includeContactIds = true;
     }
     $selectorName = $this->controller->selectorName();
     require_once str_replace('_', DIRECTORY_SEPARATOR, $selectorName) . '.php';
     $returnP = isset($returnPropeties) ? $returnPropeties : "";
     $customSearchClass = $this->get('customSearchClass');
     eval('$selector   = new ' . $selectorName . '( $customSearchClass,
              $fv,
              $params,
              $returnP,
              $this->_action,
              $includeContactIds );');
     $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:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:39,代码来源:Print.php


示例12: preProcess

 /**
  * Build all the data structures needed to build the form.
  *
  * @return void
  */
 public function preProcess()
 {
     // initialize the task and row fields
     parent::preProcess();
     $session = CRM_Core_Session::singleton();
     // Step 1: if we can't get team ID, there's no point continuing.
     $this->_id = $this->get('amtgID');
     if (!isset($this->_id)) {
         $this->_id = CRM_Utils_Request::retrieve('amtgID', 'Positive');
     }
     if (!isset($this->_id)) {
         $this->_id = $session->get('amtgID');
     }
     $session->set('amtgID', $this->_id);
     //@todo Exit more gracefully if id still isn't set
     if (!isset($this->_id)) {
         return;
     }
     $this->_teamValues = array();
     $params = array('id' => $this->_id);
     $this->_team = CRM_Contact_BAO_Group::retrieve($params, $this->_teamValues);
     $this->_context = $this->get('context');
     $this->findTeamPlayers();
     $this->findEligiblePlayers();
     $session = CRM_Core_Session::singleton();
     //$urlParams = 'reset=1&force=1';
     $session->replaceUserContext(CRM_Utils_System::url('civicrm/tournament/team'));
     //search', $urlParams));
 }
开发者ID:agloa,项目名称:tournament,代码行数:34,代码来源:AddToTeam.php


示例13: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     //check for permission to edit contributions
     if (!CRM_Core_Permission::check('issue cdn tax receipts')) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page', array('domain' => 'org.civicrm.cdntaxreceipts')));
     }
     parent::preProcess();
     $thisYear = date("Y");
     $this->_years = array($thisYear, $thisYear - 1, $thisYear - 2);
     $receipts = array();
     foreach ($this->_years as $year) {
         $receipts[$year] = array('email' => 0, 'print' => 0, 'total' => 0, 'contrib' => 0);
     }
     // count and categorize contributions
     foreach ($this->_contactIds as $id) {
         foreach ($this->_years as $year) {
             list($issuedOn, $receiptId) = cdntaxreceipts_annual_issued_on($id, $year);
             $eligible = count(cdntaxreceipts_contributions_not_receipted($id, $year));
             if ($eligible > 0) {
                 list($method, $email) = cdntaxreceipts_sendMethodForContact($id);
                 $receipts[$year][$method]++;
                 $receipts[$year]['total']++;
                 $receipts[$year]['contrib'] += $eligible;
             }
         }
     }
     $this->_receipts = $receipts;
 }
开发者ID:carriercomm,项目名称:CDNTaxReceipts,代码行数:34,代码来源:IssueAnnualTaxReceipts.php


示例14: 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:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:13,代码来源:ProximityCommon.php


示例15: preProcess

 /**
  * Build all the data structures needed to build the form.
  */
 public function preProcess()
 {
     // initialize the task and row fields
     parent::preProcess();
     $this->_context = $this->get('context');
     $this->_id = $this->get('amtgID');
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:10,代码来源:AddToGroup.php


示例16: preProcess

 public function preProcess()
 {
     parent::preProcess();
     list($groupId, $ssId) = $this->createHiddenGroup();
     $mailing = civicrm_api3('Mailing', 'create', array('name' => "", 'campaign_id' => NULL, 'replyto_email' => "", 'subject' => "", 'body_html' => "", 'body_text' => "", 'groups' => array('include' => array($groupId), 'exclude' => array(), 'base' => array()), 'mailings' => array('include' => array(), 'exclude' => array())));
     CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/a/', NULL, TRUE, '/mailing/' . $mailing['id']));
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:7,代码来源:AdhocMailing.php


示例17: preProcess

 /**
  * Build all the data structures needed to build the form
  *
  * @access public
  *
  * @return void
  */
 function preProcess()
 {
     parent::preProcess();
     // get rows
     $rows = $this->getContactRows();
     // our array now contains all contacts who can be synced to WordPress
     $this->assign('rows', $rows);
 }
开发者ID:blackbricksoftware,项目名称:civicrm-wp-profile-sync,代码行数:15,代码来源:CreateWordPressUsers.php


示例18: preProcess

 /**
  * Build all the data structures needed to build the form.
  */
 public function preProcess()
 {
     $cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE);
     $this->_searchKey = CRM_Utils_Request::retrieve('key', 'String', $this);
     // sort out whether it’s a delete-to-trash, delete-into-oblivion or restore (and let the template know)
     $values = $this->controller->exportValues();
     $this->_skipUndelete = (CRM_Core_Permission::check('access deleted contacts') and (CRM_Utils_Request::retrieve('skip_undelete', 'Boolean', $this) or CRM_Utils_Array::value('task', $values) == CRM_Contact_Task::DELETE_PERMANENTLY));
     $this->_restore = (CRM_Utils_Request::retrieve('restore', 'Boolean', $this) or CRM_Utils_Array::value('task', $values) == CRM_Contact_Task::RESTORE);
     if ($this->_restore && !CRM_Core_Permission::check('access deleted contacts')) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this contact.'));
     } elseif (!CRM_Core_Permission::check('delete contacts')) {
         CRM_Core_Error::fatal(ts('You do not have permission to delete this contact.'));
     }
     $this->assign('trash', Civi::settings()->get('contact_undelete') and !$this->_skipUndelete);
     $this->assign('restore', $this->_restore);
     if ($this->_restore) {
         CRM_Utils_System::setTitle(ts('Restore Contact'));
     }
     if ($cid) {
         if (!CRM_Contact_BAO_Contact_Permission::allow($cid, CRM_Core_Permission::EDIT)) {
             CRM_Core_Error::fatal(ts('You do not have permission to delete this contact. Note: you can delete contacts if you can edit them.'));
         } elseif (CRM_Contact_BAO_Contact::checkDomainContact($cid)) {
             CRM_Core_Error::fatal(ts('This contact is a special one for the contact information associated with the CiviCRM installation for this domain. No one is allowed to delete it because the information is used for special system purposes.'));
         }
         $this->_contactIds = array($cid);
         $this->_single = TRUE;
         $this->assign('totalSelectedContacts', 1);
     } else {
         parent::preProcess();
     }
     $this->_sharedAddressMessage = $this->get('sharedAddressMessage');
     if (!$this->_restore && !$this->_sharedAddressMessage) {
         // we check for each contact for shared contact address
         $sharedContactList = array();
         $sharedAddressCount = 0;
         foreach ($this->_contactIds as $contactId) {
             // check if a contact that is being deleted has any shared addresses
             $sharedAddressMessage = CRM_Core_BAO_Address::setSharedAddressDeleteStatus(NULL, $contactId, TRUE);
             if ($sharedAddressMessage['count'] > 0) {
                 $sharedAddressCount += $sharedAddressMessage['count'];
                 $sharedContactList = array_merge($sharedContactList, $sharedAddressMessage['contactList']);
             }
         }
         $this->_sharedAddressMessage = array('count' => $sharedAddressCount, 'contactList' => $sharedContactList);
         if ($sharedAddressCount > 0) {
             if (count($this->_contactIds) > 1) {
                 // more than one contact deleted
                 $message = ts('One of the selected contacts has an address record that is shared with 1 other contact.', array('plural' => 'One or more selected contacts have address records which are shared with %count other contacts.', 'count' => $sharedAddressCount));
             } else {
                 // only one contact deleted
                 $message = ts('This contact has an address record which is shared with 1 other contact.', array('plural' => 'This contact has an address record which is shared with %count other contacts.', 'count' => $sharedAddressCount));
             }
             CRM_Core_Session::setStatus($message . ' ' . ts('Shared addresses will not be removed or altered but will no longer be shared.'), ts('Shared Addesses Owner'));
         }
         // set in form controller so that queries are not fired again
         $this->set('sharedAddressMessage', $this->_sharedAddressMessage);
     }
 }
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:61,代码来源:Delete.php


示例19: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     parent::preProcess();
     // display name and email of all contact ids
     $contactIDs = implode(',', $this->_contactIds);
     $query = "\nSELECT c.id as contact_id, c.display_name as name,\n       c.contact_type as contact_type, e.email as email\nFROM   civicrm_contact c, civicrm_email e\nWHERE  e.contact_id = c.id\nAND    e.is_primary = 1\nAND    c.id IN ( {$contactIDs} )";
     $rows = array();
     $dao = CRM_Core_DAO::executeQuery($query);
     while ($dao->fetch()) {
         $rows[] = array('id' => $dao->contact_id, 'name' => $dao->name, 'contact_type' => $dao->contact_type, 'email' => $dao->email);
     }
     $this->assign('rows', $rows);
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:19,代码来源:HookSample.php


示例20: preProcess

 /**
  * build all the data structures needed to build the form
  *
  * @return void
  * @access public
  */
 function preProcess()
 {
     $cid = CRM_Utils_Request::retrieve('cid', $this, false);
     $lid = CRM_Utils_Request::retrieve('lid', $this, false);
     if ($cid) {
         $this->_contactIds = array($cid);
         $this->_single = true;
     } else {
         parent::preProcess();
     }
     $this->createLocation($this->_contactIds, $lid);
     $this->assign('single', $this->_single);
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:19,代码来源:Map.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP CRM_Contact_Page_View类代码示例发布时间:2022-05-20
下一篇:
PHP CRM_Contact_Form_Search_Custom_Base类代码示例发布时间: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