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


PHP CRM_Utils_System::getClassName方法代码示例

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


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

示例1: preProcess

 /** 
  * Function to set variables up before form is built 
  *                                                           
  * @return void 
  */
 function preProcess(&$form)
 {
     $form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String', CRM_Core_DAO::$_nullObject);
     $additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive', CRM_Core_DAO::$_nullObject);
     $form->assign("addBlock", false);
     if ($form->_addBlockName && $additionalblockCount) {
         $form->assign("addBlock", true);
         $form->assign("blockName", $form->_addBlockName);
         $form->assign("blockId", $additionalblockCount);
         $form->set($form->_addBlockName . "_Block_Count", $additionalblockCount);
     }
     $className = CRM_Utils_System::getClassName($form);
     if (in_array($className, array('CRM_Event_Form_ManageEvent_Location', 'CRM_Contact_Form_Domain'))) {
         $form->_blocks = array('Address' => ts('Address'), 'Email' => ts('Email'), 'Phone' => ts('Phone'));
     }
     $form->assign('blocks', $form->_blocks);
     $form->assign('className', $className);
     // get address sequence.
     if (!($addressSequence = $form->get('addressSequence'))) {
         require_once 'CRM/Core/BAO/Address.php';
         $addressSequence = CRM_Core_BAO_Address::addressSequence();
         $form->set('addressSequence', $addressSequence);
     }
     $form->assign('addressSequence', $addressSequence);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:30,代码来源:Location.php

示例2: 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');
                 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::preprocess();');
                     $values = $this->controller->exportValues('Search');
                 } else {
                     $values = $this->controller->exportValues('Basic');
                 }
             }
         }
     }
     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::preprocess();
     } else {
         $this->assign('taskName', "Export {$componentName['1']}");
         eval('$componentTasks = CRM_' . $componentName[1] . '_Task::tasks();');
         $taskName = $componentTasks[$this->_task];
     }
     $this->assign('totalSelectedRecords', count($this->_componentIds));
     $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);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:67,代码来源:Select.php

示例3: buildQuickForm

 /**
  * build the form elements for an email object
  *
  * @param CRM_Core_Form $form       reference to the form object
  * @param array         $location   the location object to store all the form elements in
  * @param int           $locationId the locationId we are dealing with
  * @param int           $count      the number of blocks to create
  *
  * @return void
  * @access public
  * @static
  */
 static function buildQuickForm(&$form, $addressBlockCount = null)
 {
     // passing this via the session is AWFUL. we need to fix this
     if (!$addressBlockCount) {
         $blockId = $form->get('Email_Block_Count') ? $form->get('Email_Block_Count') : 1;
     } else {
         $blockId = $addressBlockCount;
     }
     $form->applyFilter('__ALL__', 'trim');
     //Email box
     $form->addElement('text', "email[{$blockId}][email]", ts('Email'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Email', 'email'));
     $form->addRule("email[{$blockId}][email]", ts('Email is not valid.'), 'email');
     if (isset($form->_contactType)) {
         //Block type
         $form->addElement('select', "email[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::locationType());
         //On-hold checkbox
         $form->addElement('advcheckbox', "email[{$blockId}][on_hold]", null);
         //Bulkmail checkbox
         $js = array('id' => "Email_" . $blockId . "_IsBulkmail", 'onClick' => 'singleSelect( this.id );');
         $form->addElement('advcheckbox', "email[{$blockId}][is_bulkmail]", null, '', $js);
         //is_Primary radio
         $js = array('id' => "Email_" . $blockId . "_IsPrimary", 'onClick' => 'singleSelect( this.id );');
         $form->addElement('radio', "email[{$blockId}][is_primary]", '', '', '1', $js);
         if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Contact') {
             $form->add('textarea', "email[{$blockId}][signature_text]", ts('Signature (Text)'), array('rows' => 2, 'cols' => 40));
             $form->addWysiwyg("email[{$blockId}][signature_html]", ts('Signature (HTML)'), array('rows' => 2, 'cols' => 40));
         }
     }
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:41,代码来源:Email.php

示例4: preProcess

 /**
  * Build all the data structures needed to build the form.
  *
  * @param
  *
  * @return void
  */
 public function preProcess()
 {
     $this->_selectAll = FALSE;
     $this->_exportMode = self::RELATIONSHIP_EXPORT;
     $this->_componentIds = array();
     $this->_componentClause = NULL;
     // we need to determine component export
     $stateMachine = $this->controller->getStateMachine();
     $formName = CRM_Utils_System::getClassName($stateMachine);
     $componentName = explode('_', $formName);
     $className = "CRM_Relationship_Form_Task";
     $className::preProcessCommon($this, TRUE);
     $values = $this->controller->exportValues('Search');
     $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;
             }
         }
     }
     $this->_task = $values['task'];
     $this->assign('taskName', "Export {$componentName['1']}");
     $className = "CRM_{$componentName[1]}_Task";
     $componentTasks = $className::tasks();
     $taskName = $componentTasks[$this->_task];
     $component = TRUE;
     if ($this->_componentTable) {
         $query = "SELECT count(*) FROM {$this->_componentTable}";
         $totalSelectedRecords = CRM_Core_DAO::singleValueQuery($query);
     } else {
         $totalSelectedRecords = count($this->_componentIds);
     }
     $this->assign('totalSelectedRecords', $totalSelectedRecords);
     $this->assign('taskName', $taskName);
     $this->assign('component', $component);
     // all records actions = save a search
     if ($values['radio_ts'] == 'ts_all') {
         $this->_selectAll = TRUE;
         $rowCount = $this->get('rowCount');
         if ($rowCount > 2) {
             $this->_matchingContacts = TRUE;
         }
         $this->assign('totalSelectedRecords', $rowCount);
     }
     $this->assign('matchingContacts', $this->_matchingContacts);
     $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:Chirojeugd-Vlaanderen,项目名称:civicrm-relationship-entity,代码行数:64,代码来源:Select.php

示例5: getTemplateFileName

 function getTemplateFileName()
 {
     $ext = CRM_Extension_System::singleton()->getMapper();
     if ($ext->isExtensionClass(CRM_Utils_System::getClassName($this->_customClass))) {
         $fileName = $ext->getTemplatePath(CRM_Utils_System::getClassName($this->_customClass)) . '/' . $ext->getTemplateName(CRM_Utils_System::getClassName($this->_customClass));
     } else {
         $fileName = $this->_customClass->templateFile();
     }
     return $fileName ? $fileName : parent::getTemplateFileName();
 }
开发者ID:hguru,项目名称:224Civi,代码行数:10,代码来源:Custom.php

示例6: getTemplateFileName

 function getTemplateFileName()
 {
     $ext = new CRM_Core_Extensions();
     if ($ext->isExtensionClass(CRM_Utils_System::getClassName($this->_customClass))) {
         $fileName = $ext->getTemplatePath(CRM_Utils_System::getClassName($this->_customClass)) . '/' . $ext->getTemplateName(CRM_Utils_System::getClassName($this->_customClass));
     } else {
         $fileName = $this->_customClass->templateFile();
     }
     return $fileName ? $fileName : parent::getTemplateFileName();
 }
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:10,代码来源:Custom.php

示例7: getTemplateFileName

 function getTemplateFileName()
 {
     require_once 'CRM/Core/Extensions.php';
     $ext = new CRM_Core_Extensions();
     if ($ext->isExtensionClass(CRM_Utils_System::getClassName($this->_customClass))) {
         $filename = $ext->getTemplatePath(CRM_Utils_System::getClassName($this->_customClass));
     } else {
         $fileName = $this->_customClass->templateFile();
     }
     return $fileName ? $fileName : parent::getTemplateFileName();
 }
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:11,代码来源:Custom.php

示例8: preProcessFromAddress

 /**
  * @param $form
  */
 static function preProcessFromAddress(&$form)
 {
     $form->_single = FALSE;
     $className = CRM_Utils_System::getClassName($form);
     if (property_exists($form, '_context') && $form->_context != 'search' && $className == 'CRM_Contact_Form_Task_Email') {
         $form->_single = TRUE;
     }
     $form->_emails = $emails = array();
     $session = CRM_Core_Session::singleton();
     $contactID = $session->get('userID');
     $form->_contactIds = array($contactID);
     $contactEmails = CRM_Core_BAO_Email::allEmails($contactID);
     $form->_onHold = array();
     $fromDisplayName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $contactID, 'display_name');
     foreach ($contactEmails as $emailId => $item) {
         $email = $item['email'];
         if (!$email && count($emails) < 1) {
             // set it if no emails are present at all
             $form->_noEmails = TRUE;
         } else {
             if ($email) {
                 if (in_array($email, $emails)) {
                     // CRM-3624
                     continue;
                 }
                 $emails[$emailId] = '"' . $fromDisplayName . '" <' . $email . '> ';
                 $form->_onHold[$emailId] = $item['on_hold'];
                 $form->_noEmails = FALSE;
             }
         }
         $form->_emails[$emailId] = $emails[$emailId];
         $emails[$emailId] .= $item['locationType'];
         if ($item['is_primary']) {
             $emails[$emailId] .= ' ' . ts('(preferred)');
         }
         $emails[$emailId] = htmlspecialchars($emails[$emailId]);
     }
     $form->assign('noEmails', $form->_noEmails);
     if ($form->_noEmails) {
         CRM_Core_Error::statusBounce(ts('Your user record does not have a valid email address'));
     }
     // now add domain from addresses
     $domainEmails = array();
     $domainFrom = CRM_Core_OptionGroup::values('from_email_address');
     foreach (array_keys($domainFrom) as $k) {
         $domainEmail = $domainFrom[$k];
         $domainEmails[$domainEmail] = htmlspecialchars($domainEmail);
         $form->_emails[$domainEmail] = $domainEmail;
     }
     $form->_fromEmails = CRM_Utils_Array::crmArrayMerge($emails, $domainEmails);
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:54,代码来源:EmailCommon.php

示例9: buildAllowedDateFormats

 /**
  * This function is to build the date-format form
  *
  * @param Object  $form   the form object that we are operating on
  *
  * @static
  * @access public
  */
 static function buildAllowedDateFormats(&$form)
 {
     $dateOptions = array();
     if (CRM_Utils_System::getClassName($form) == 'CRM_Activity_Import_Form_DataSource') {
         $dateText = ts('yyyy-mm-dd OR yyyy-mm-dd HH:mm OR yyyymmdd OR yyyymmdd HH:mm (1998-12-25 OR 1998-12-25 15:33 OR 19981225 OR 19981225 10:30 OR ( 2008-9-1 OR 2008-9-1 15:33 OR 20080901 15:33)');
     } else {
         $dateText = ts('yyyy-mm-dd OR yyyymmdd (1998-12-25 OR 19981225) OR (2008-9-1 OR 20080901)');
     }
     $dateOptions[] = $form->createElement('radio', NULL, NULL, $dateText, self::DATE_yyyy_mm_dd);
     $dateOptions[] = $form->createElement('radio', NULL, NULL, ts('mm/dd/yy OR mm-dd-yy (12/25/98 OR 12-25-98) OR (9/1/08 OR 9-1-08)'), self::DATE_mm_dd_yy);
     $dateOptions[] = $form->createElement('radio', NULL, NULL, ts('mm/dd/yyyy OR mm-dd-yyyy (12/25/1998 OR 12-25-1998) OR (9/1/2008 OR 9-1-2008)'), self::DATE_mm_dd_yyyy);
     $dateOptions[] = $form->createElement('radio', NULL, NULL, ts('Month dd, yyyy (December 12, 1998)'), self::DATE_Month_dd_yyyy);
     $dateOptions[] = $form->createElement('radio', NULL, NULL, ts('dd-mon-yy OR dd/mm/yy (25-Dec-98 OR 25/12/98)'), self::DATE_dd_mon_yy);
     $dateOptions[] = $form->createElement('radio', NULL, NULL, ts('dd/mm/yyyy (25/12/1998) OR (1/9/2008)'), self::DATE_dd_mm_yyyy);
     $form->addGroup($dateOptions, 'dateFormats', ts('Date Format'), '<br/>');
     $form->setDefaults(array('dateFormats' => self::DATE_yyyy_mm_dd));
 }
开发者ID:hguru,项目名称:224Civi,代码行数:25,代码来源:Date.php

示例10: buildAllowedDateFormats

 /**
  * This function is to build the date-format form
  *
  * @param Object  $form   the form object that we are operating on
  * 
  * @static
  * @access public
  */
 static function buildAllowedDateFormats(&$form)
 {
     $dateOptions = array();
     require_once "CRM/Utils/System.php";
     if (CRM_Utils_System::getClassName($form) == 'CRM_Activity_Import_Form_UploadFile') {
         $dateText = ts('yyyy-mm-dd OR yyyymmdd OR yyyymmdd hh:mm (1998-12-25 OR 19981225 OR 19981225 10:30) OR (2008-9-1 OR 20080901 10:30)');
     } else {
         $dateText = ts('yyyy-mm-dd OR yyyymmdd (1998-12-25 OR 19981225) OR (2008-9-1 OR 20080901)');
     }
     $dateOptions[] = HTML_QuickForm::createElement('radio', null, null, $dateText, self::DATE_yyyy_mm_dd);
     $dateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('mm/dd/yy OR mm-dd-yy (12/25/98 OR 12-25-98) OR (9/1/08 OR 9-1-08)'), self::DATE_mm_dd_yy);
     $dateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('mm/dd/yyyy OR mm-dd-yyyy (12/25/1998 OR 12-25-1998) OR (9/1/2008 OR 9-1-2008)'), self::DATE_mm_dd_yyyy);
     $dateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('Month dd, yyyy (December 12, 1998)'), self::DATE_Month_dd_yyyy);
     $dateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('dd-mon-yy OR dd/mm/yy (25-Dec-98 OR 25/12/98)'), self::DATE_dd_mon_yy);
     $dateOptions[] = HTML_QuickForm::createElement('radio', null, null, ts('dd/mm/yyyy (25/12/1998) OR (1/9/2008)'), self::DATE_dd_mm_yyyy);
     $form->addGroup($dateOptions, 'dateFormats', ts('Date Format'), '<br/>');
     $form->setDefaults(array('dateFormats' => self::DATE_yyyy_mm_dd));
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:26,代码来源:Date.php

示例11: preProcess

 /**
  * Set variables up before form is built.
  *
  * @param CRM_Core_Form $form
  *
  * @return void
  */
 public static function preProcess(&$form)
 {
     $form->_addBlockName = CRM_Utils_Request::retrieve('block', 'String', CRM_Core_DAO::$_nullObject);
     $additionalblockCount = CRM_Utils_Request::retrieve('count', 'Positive', CRM_Core_DAO::$_nullObject);
     $form->assign('addBlock', FALSE);
     if ($form->_addBlockName && $additionalblockCount) {
         $form->assign('addBlock', TRUE);
         $form->assign('blockName', $form->_addBlockName);
         $form->assign('blockId', $additionalblockCount);
         $form->set($form->_addBlockName . '_Block_Count', $additionalblockCount);
     }
     if (is_a($form, 'CRM_Event_Form_ManageEvent_Location') || is_a($form, 'CRM_Contact_Form_Domain')) {
         $form->_blocks = array('Address' => ts('Address'), 'Email' => ts('Email'), 'Phone' => ts('Phone'));
     }
     $form->assign('blocks', $form->_blocks);
     $form->assign('className', CRM_Utils_System::getClassName($form));
     // get address sequence.
     if (!($addressSequence = $form->get('addressSequence'))) {
         $addressSequence = CRM_Core_BAO_Address::addressSequence();
         $form->set('addressSequence', $addressSequence);
     }
     $form->assign('addressSequence', $addressSequence);
 }
开发者ID:kidaa30,项目名称:yes,代码行数:30,代码来源:Location.php

示例12: __construct

 /**
  * All CRM single or multi page pages should inherit from this class. 
  *
  * @param string  title        descriptive title of the controller
  * @param boolean whether      controller is modal
  * @param string  scope        name of session if we want unique scope, used only by Controller_Simple
  * @param boolean addSequence  should we add a unique sequence number to the end of the key
  * @param boolean ignoreKey    should we not set a qfKey for this controller (for standalone forms)
  *
  * @access public
  *   
  * @return void
  *
  */
 function __construct($title = null, $modal = true, $mode = null, $scope = null, $addSequence = false, $ignoreKey = false)
 {
     // add a unique validable key to the name
     $name = CRM_Utils_System::getClassName($this);
     $name = $name . '_' . $this->key($name, $addSequence, $ignoreKey);
     $this->HTML_QuickForm_Controller($name, $modal);
     $this->_title = $title;
     if ($scope) {
         $this->_scope = $scope;
     } else {
         $this->_scope = CRM_Utils_System::getClassName($this);
     }
     $this->_scope = $this->_scope . '_' . $this->_key;
     // let the constructor initialize this, should happen only once
     if (!isset(self::$_template)) {
         self::$_template =& CRM_Core_Smarty::singleton();
         self::$_session =& CRM_Core_Session::singleton();
     }
     $snippet = CRM_Utils_Array::value('snippet', $_REQUEST);
     //$snippet = CRM_Utils_Request::retrieve( 'snippet', 'Integer', $this, false, null, $_REQUEST );
     if ($snippet) {
         if ($snippet == 3) {
             $this->_print = CRM_Core_Smarty::PRINT_PDF;
         } else {
             if ($snippet == 4) {
                 $this->_print = CRM_Core_Smarty::PRINT_NOFORM;
                 self::$_template->assign('suppressForm', true);
             } else {
                 if ($snippet == 5) {
                     $this->_print = CRM_Core_Smarty::PRINT_NOFORM;
                 } else {
                     $this->_print = CRM_Core_Smarty::PRINT_SNIPPET;
                 }
             }
         }
     }
     // if the request has a reset value, initialize the controller session
     if (CRM_Utils_Array::value('reset', $_GET)) {
         $this->reset();
     }
     // set the key in the session
     // do this at the end so we have initialized the object
     // and created the scope etc
     $this->set('qfKey', $this->_key);
     require_once 'CRM/Utils/Request.php';
     // also retrieve and store destination in session
     $this->_destination = CRM_Utils_Request::retrieve('destination', 'String', $this, false, null, $_REQUEST);
 }
开发者ID:ksecor,项目名称:civicrm,代码行数:62,代码来源:Controller.php

示例13: commonCompose

 /**
  * Build the  compose mail form.
  *
  * @param CRM_Core_Form $form
  *
  * @return void
  */
 public static function commonCompose(&$form)
 {
     //get the tokens.
     $tokens = array();
     if (method_exists($form, 'listTokens')) {
         $tokens = array_merge($form->listTokens(), $tokens);
     }
     //sorted in ascending order tokens by ignoring word case
     $form->assign('tokens', CRM_Utils_Token::formatTokensForDisplay($tokens));
     $templates = array();
     $textFields = array('text_message' => ts('HTML Format'), 'sms_text_message' => ts('SMS Message'));
     $modePrefixes = array('Mail' => NULL, 'SMS' => 'SMS');
     $className = CRM_Utils_System::getClassName($form);
     if ($className != 'CRM_SMS_Form_Upload' && $className != 'CRM_Contact_Form_Task_SMS' && $className != 'CRM_Contact_Form_Task_SMS') {
         $form->add('wysiwyg', 'html_message', ts('HTML Format'), array('cols' => '80', 'rows' => '8', 'onkeyup' => "return verify(this)"));
         if ($className != 'CRM_Admin_Form_ScheduleReminders') {
             unset($modePrefixes['SMS']);
         }
     } else {
         unset($textFields['text_message']);
         unset($modePrefixes['Mail']);
     }
     //insert message Text by selecting "Select Template option"
     foreach ($textFields as $id => $label) {
         $prefix = NULL;
         if ($id == 'sms_text_message') {
             $prefix = "SMS";
             $form->assign('max_sms_length', CRM_SMS_Provider::MAX_SMS_CHAR);
         }
         $form->add('textarea', $id, $label, array('cols' => '80', 'rows' => '8', 'onkeyup' => "return verify(this, '{$prefix}')"));
     }
     foreach ($modePrefixes as $prefix) {
         if ($prefix == 'SMS') {
             $templates[$prefix] = CRM_Core_BAO_MessageTemplate::getMessageTemplates(FALSE, TRUE);
         } else {
             $templates[$prefix] = CRM_Core_BAO_MessageTemplate::getMessageTemplates(FALSE);
         }
         if (!empty($templates[$prefix])) {
             $form->assign('templates', TRUE);
             $form->add('select', "{$prefix}template", ts('Use Template'), array('' => ts('- select -')) + $templates[$prefix], FALSE, array('onChange' => "selectValue( this.value, '{$prefix}');"));
         }
         $form->add('checkbox', "{$prefix}updateTemplate", ts('Update Template'), NULL);
         $form->add('checkbox', "{$prefix}saveTemplate", ts('Save As New Template'), NULL, FALSE, array('onclick' => "showSaveDetails(this, '{$prefix}');"));
         $form->add('text', "{$prefix}saveTemplateName", ts('Template Title'));
     }
     // I'm not sure this is ever called.
     $action = CRM_Utils_Request::retrieve('action', 'String', $form, FALSE);
     if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Task_PDF' && $action == CRM_Core_Action::VIEW) {
         $form->freeze('html_message');
     }
 }
开发者ID:scardinius,项目名称:civicrm-core-api-mailing,代码行数:58,代码来源:Mailing.php

示例14: getTemplateFileName

 /**
  * Use the form name to create the tpl file name.
  *
  * @return string
  */
 public function getTemplateFileName()
 {
     return strtr(CRM_Utils_System::getClassName($this), array('_' => DIRECTORY_SEPARATOR, '\\' => DIRECTORY_SEPARATOR)) . '.tpl';
 }
开发者ID:utkarshsharma,项目名称:civicrm-core,代码行数:9,代码来源:Page.php

示例15: isSupported

 /**
  * Check whether a method is present ( & supported ) by the payment processor object.
  *
  * @param string $method
  *   Method to check for.
  *
  * @return bool
  */
 public function isSupported($method = 'cancelSubscription')
 {
     return method_exists(CRM_Utils_System::getClassName($this), $method);
 }
开发者ID:kidaa30,项目名称:yes,代码行数:12,代码来源:Payment.php


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