本文整理汇总了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 );
}
示例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);
}
}
示例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'));
}
示例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'));
}
示例5: preProcess
/**
* Function to pre process the form
*
* @access public
* @return None
*/
function preProcess()
{
parent::preProcess();
}
示例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();
}