当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_PCP_BAO_PCP::getOwnerNotificationId方法代码示例

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


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

示例1: buildQuickForm

 /**
  * Build the form object.
  *
  * @return void
  */
 public function buildQuickForm()
 {
     $this->add('text', 'pcp_title', ts('Title'), NULL, TRUE);
     $this->add('textarea', 'pcp_intro_text', ts('Welcome'), NULL, TRUE);
     $this->add('text', 'goal_amount', ts('Your Goal'), NULL, TRUE);
     $this->addRule('goal_amount', ts('Goal Amount should be a numeric value'), 'money');
     $attributes = array();
     if ($this->_component == 'event') {
         if ($this->get('action') & CRM_Core_Action::ADD) {
             $attributes = array('value' => ts('Join Us'), 'onClick' => 'select();');
         }
         $this->add('text', 'donate_link_text', ts('Sign up Button'), $attributes);
     } else {
         if ($this->get('action') & CRM_Core_Action::ADD) {
             $attributes = array('value' => ts('Donate Now'), 'onClick' => 'select();');
         }
         $this->add('text', 'donate_link_text', ts('Donation Button'), $attributes);
     }
     $attrib = array('rows' => 8, 'cols' => 60);
     $this->add('textarea', 'page_text', ts('Your Message'), NULL, FALSE);
     $maxAttachments = 1;
     CRM_Core_BAO_File::buildAttachment($this, 'civicrm_pcp', $this->_pageId, $maxAttachments);
     $this->addElement('checkbox', 'is_thermometer', ts('Progress Bar'));
     $this->addElement('checkbox', 'is_honor_roll', ts('Honor Roll'), NULL);
     if ($this->_pageId) {
         $params = array('id' => $this->_pageId);
         CRM_Core_DAO::commonRetrieve('CRM_PCP_DAO_PCP', $params, $pcpInfo);
         $owner_notification_option = CRM_Core_DAO::getFieldValue('CRM_PCP_DAO_PCPBlock', $pcpInfo['pcp_block_id'], 'owner_notify_id');
     } else {
         $owner_notification_option = CRM_PCP_BAO_PCP::getOwnerNotificationId($this->controller->get('component_page_id'), $this->_component ? $this->_component : 'contribute');
     }
     if ($owner_notification_option == CRM_Core_OptionGroup::getValue('pcp_owner_notify', 'owner_chooses', 'name')) {
         $this->assign('owner_notification_option', TRUE);
         $this->addElement('checkbox', 'is_notify', ts('Notify me via email when someone donates to my page'), NULL);
     }
     $this->addElement('checkbox', 'is_active', ts('Active'));
     if ($this->_context == 'dashboard') {
         CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/admin/pcp', 'reset=1'));
     }
     $this->addButtons(array(array('type' => 'upload', 'name' => ts('Save'), 'isDefault' => TRUE), array('type' => 'cancel', 'name' => ts('Cancel'))));
     $this->addFormRule(array('CRM_PCP_Form_Campaign', 'formRule'), $this);
 }
开发者ID:aydun,项目名称:uk.co.vedaconsulting.quickdonate,代码行数:47,代码来源:Campaign.php


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