當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Contribute_Form_ContributionPage::preProcess方法代碼示例

本文整理匯總了PHP中CRM_Contribute_Form_ContributionPage::preProcess方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Contribute_Form_ContributionPage::preProcess方法的具體用法?PHP CRM_Contribute_Form_ContributionPage::preProcess怎麽用?PHP CRM_Contribute_Form_ContributionPage::preProcess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Contribute_Form_ContributionPage的用法示例。


在下文中一共展示了CRM_Contribute_Form_ContributionPage::preProcess方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: preProcess

 /**
  * Pre  process the form.
  *
  *
  * @return void
  */
 public function preProcess()
 {
     parent::preProcess();
     $this->_products = CRM_Contribute_PseudoConstant::products($this->_id);
     $this->_pid = CRM_Utils_Request::retrieve('pid', 'Positive', $this, FALSE, 0);
     if ($this->_pid) {
         $dao = new CRM_Contribute_DAO_PremiumsProduct();
         $dao->id = $this->_pid;
         $dao->find(TRUE);
         $temp = CRM_Contribute_PseudoConstant::products();
         $this->_products[$dao->product_id] = $temp[$dao->product_id];
     }
     //$this->_products = array_merge(array('' => '-- Select Product --') , $this->_products );
 }
開發者ID:kidaa30,項目名稱:yes,代碼行數:20,代碼來源:AddProduct.php

示例2: preProcess

 /**
  * Function to set variables up before form is built
  *
  * @return void
  * @access public
  */
 public function preProcess()
 {
     //Check if there are contributions related to Contribution Page
     parent::preProcess();
     //check for delete
     if (!CRM_Core_Permission::checkActionPermission('CiviContribute', $this->_action)) {
         CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
     }
     $dao = new CRM_Contribute_DAO_Contribution();
     $dao->contribution_page_id = $this->_id;
     if ($dao->find(TRUE)) {
         $this->_relatedContributions = TRUE;
         $this->assign('relatedContributions', TRUE);
     }
 }
開發者ID:archcidburnziso,項目名稱:civicrm-core,代碼行數:21,代碼來源:Delete.php

示例3: preProcess

 function preProcess()
 {
     parent::preProcess();
     require_once 'CRM/Contribute/DAO/Widget.php';
     $this->_widget = new CRM_Contribute_DAO_Widget();
     $this->_widget->contribution_page_id = $this->_id;
     if (!$this->_widget->find(true)) {
         $this->_widget = null;
     } else {
         $this->assign('widget_id', $this->_widget->id);
     }
     $this->assign('id', $this->_id);
     $config =& CRM_Core_Config::singleton();
     $title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
     $this->_fields = array('title' => array(ts('Title'), 'text', false, $title), 'url_logo' => array(ts('URL to Logo Image'), 'text', false, null), 'button_title' => array(ts('Button Title'), 'text', false, ts('Contribute!')), 'url_homepage' => array(ts('URL to Home Page'), 'text', false, $config->userFrameworkBaseURL));
     $this->_colorFields = array('color_title' => array(ts('Title Text Color'), 'text', false, '0x000000'), 'color_button' => array(ts('Button Color'), 'text', false, '0xCC9900'), 'color_bar' => array(ts('Progress Bar Color'), 'text', false, '0xCC9900'), 'color_main_text' => array(ts('Additional Text Color'), 'text', false, '0x000000'), 'color_main' => array(ts('Inner Background Gradient from Bottom'), 'text', false, '0x96E0E0'), 'color_main_bg' => array(ts('Inner Background Top Area'), 'text', false, '0xFFFFFF'), 'color_bg' => array(ts('Border Color'), 'text', false, '0x66CCCC'), 'color_about_link' => array(ts('About Link Color'), 'text', false, '0x336699'), 'color_homepage_link' => array(ts('Homepage Link Color'), 'text', false, '0x336699'));
 }
開發者ID:bhirsch,項目名稱:voipdev,代碼行數:17,代碼來源:Widget.php

示例4: preProcess

 function preProcess()
 {
     parent::preProcess();
     $this->_widget = new CRM_Contribute_DAO_Widget();
     $this->_widget->contribution_page_id = $this->_id;
     if (!$this->_widget->find(TRUE)) {
         $this->_widget = NULL;
     } else {
         $this->assign('widget_id', $this->_widget->id);
         // check of home url is set, if set then it flash widget might be in use.
         $this->assign('showStatus', FALSE);
         if ($this->_widget->url_homepage) {
             $this->assign('showStatus', TRUE);
         }
     }
     $this->assign('cpageId', $this->_id);
     $config = CRM_Core_Config::singleton();
     $title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
     $this->_fields = array('title' => array(ts('Title'), 'text', FALSE, $title), 'url_logo' => array(ts('URL to Logo Image'), 'text', FALSE, NULL), 'button_title' => array(ts('Button Title'), 'text', FALSE, ts('Contribute!')));
     $this->_colorFields = array('color_title' => array(ts('Title Text Color'), 'text', FALSE, '#2786C2'), 'color_bar' => array(ts('Progress Bar Color'), 'text', FALSE, '#FFFFFF'), 'color_main_text' => array(ts('Additional Text Color'), 'text', FALSE, '#FFFFFF'), 'color_main' => array(ts('Background Color'), 'text', FALSE, '#96C0E7'), 'color_main_bg' => array(ts('Background Color Top Area'), 'text', FALSE, '#B7E2FF'), 'color_bg' => array(ts('Border Color'), 'text', FALSE, '#96C0E7'), 'color_about_link' => array(ts('Button Link Color'), 'text', FALSE, '#556C82'), 'color_button' => array(ts('Button Background Color'), 'text', FALSE, '#FFFFFF'), 'color_homepage_link' => array(ts('Homepage Link Color'), 'text', FALSE, '#FFFFFF'));
 }
開發者ID:prashantgajare,項目名稱:civicrm-core,代碼行數:21,代碼來源:Widget.php

示例5: preProcess

 /**
  * Function to pre process the form
  *
  * @access public
  * @return None
  */
 function preProcess()
 {
     parent::preProcess();
 }
開發者ID:ksecor,項目名稱:civicrm,代碼行數:10,代碼來源:PCP.php

示例6: preProcess

 /**
  * Set variables up before form is built.
  *
  * @return void
  */
 public function preProcess()
 {
     CRM_Core_Resources::singleton()->addStyleFile('org.civicrm.webtracking', 'css/web-tracking-form.css');
     parent::preProcess();
 }
開發者ID:VishalAgarwal,項目名稱:org.civicrm.webtracking,代碼行數:10,代碼來源:WebTracking.php


注:本文中的CRM_Contribute_Form_ContributionPage::preProcess方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。