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


PHP SugarEmailAddress::handleLegacyRetrieve方法代码示例

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


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

示例1: testEmailAddressInFetchedRow

 /**
  * @group bug42279
  */
 public function testEmailAddressInFetchedRow()
 {
     $sea = new SugarEmailAddress();
     // this will populate contact->email1
     $sea->populateLegacyFields($this->contact);
     $email1 = $this->contact->email1;
     // this should set fetched_row['email1'] to contatc->email1
     $sea->handleLegacyRetrieve($this->contact);
     $this->assertEquals($email1, $this->contact->fetched_row['email1']);
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:13,代码来源:Bug42279Test.php

示例2: getWideFormBody

    function getWideFormBody($prefix, $mod = '', $formname = '', $contact = '')
    {
        if (!ACLController::checkAccess('Accounts', 'edit', true)) {
            return '';
        }
        if (empty($contact)) {
            $contact = new Contact();
        }
        global $mod_strings;
        $temp_strings = $mod_strings;
        if (!empty($mod)) {
            global $current_language;
            $mod_strings = return_module_language($current_language, $mod);
        }
        global $app_strings;
        global $current_user;
        $account = new Account();
        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
        $lbl_account_name = $mod_strings['LBL_ACCOUNT_NAME'];
        $lbl_phone = $mod_strings['LBL_PHONE'];
        $lbl_website = $mod_strings['LBL_WEBSITE'];
        if (isset($contact->assigned_user_id)) {
            $user_id = $contact->assigned_user_id;
        } else {
            $user_id = $current_user->id;
        }
        //Retrieve Email address and set email1, email2
        $sugarEmailAddress = new SugarEmailAddress();
        $sugarEmailAddress->handleLegacyRetrieve($contact);
        if (!isset($contact->email1)) {
            $contact->email1 = '';
        }
        if (!isset($contact->email2)) {
            $contact->email2 = '';
        }
        if (!isset($contact->email_opt_out)) {
            $contact->email_opt_out = '';
        }
        $form = "";
        $default_desc = "";
        if (!empty($contact->description)) {
            $default_desc = $contact->description;
        }
        $form .= <<<EOQ
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}phone_fax" value="{$contact->phone_fax}">
\t\t<input type="hidden" name="{$prefix}phone_other" value="{$contact->phone_other}">
\t\t<input type="hidden" name="{$prefix}email1" value="{$contact->email1}">
\t\t<input type="hidden" name="{$prefix}email2" value="{$contact->email2}">
\t\t<input type='hidden' name='{$prefix}billing_address_street' value='{$contact->primary_address_street}'><input type='hidden' name='{$prefix}billing_address_city' value='{$contact->primary_address_city}'><input type='hidden' name='{$prefix}billing_address_state'   value='{$contact->primary_address_state}'><input type='hidden' name='{$prefix}billing_address_postalcode'   value='{$contact->primary_address_postalcode}'><input type='hidden' name='{$prefix}billing_address_country'  value='{$contact->primary_address_country}'>
\t\t<input type='hidden' name='{$prefix}shipping_address_street' value='{$contact->alt_address_street}'><input type='hidden' name='{$prefix}shipping_address_city' value='{$contact->alt_address_city}'><input type='hidden' name='{$prefix}shipping_address_state'   value='{$contact->alt_address_state}'><input type='hidden' name='{$prefix}shipping_address_postalcode'   value='{$contact->alt_address_postalcode}'><input type='hidden' name='{$prefix}shipping_address_country'  value='{$contact->alt_address_country}'>
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t<input type='hidden' name='{$prefix}do_not_call'  value='{$contact->do_not_call}'>
\t\t<input type='hidden' name='{$prefix}email_opt_out'  value='{$contact->email_opt_out}'>
\t\t<table width='100%' border="0" cellpadding="0" cellspacing="0">
\t\t<tr>
\t\t<td width="20%" nowrap scope="row">{$lbl_account_name}&nbsp;<span class="required">{$lbl_required_symbol}</span></td>
\t\t<TD width="80%" nowrap scope="row">{$mod_strings['LBL_DESCRIPTION']}</TD>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap ><input name='{$prefix}name' type="text" value="{$contact->account_name}"></td>
\t\t<TD rowspan="5" ><textarea name='{$prefix}description' rows='6' cols='50' >{$default_desc}</textarea></TD>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap scope="row">{$lbl_phone}</td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap ><input name='{$prefix}phone_office' type="text" value="{$contact->phone_work}"></td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap scope="row">{$lbl_website}</td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap ><input name='{$prefix}website' type="text" value="http://"></td>
\t\t</tr>
EOQ;
        //carry forward custom lead fields common to accounts during Lead Conversion
        $tempAccount = new Account();
        if (method_exists($contact, 'convertCustomFieldsForm')) {
            $contact->convertCustomFieldsForm($form, $tempAccount, $prefix);
        }
        unset($tempAccount);
        $form .= <<<EOQ
\t\t</TABLE>
EOQ;
        $javascript = new javascript();
        $javascript->setFormName($formname);
        $javascript->setSugarBean(new Account());
        $javascript->addRequiredFields($prefix);
        $form .= $javascript->getScript();
        $mod_strings = $temp_strings;
        return $form;
    }
开发者ID:klr2003,项目名称:sourceread,代码行数:93,代码来源:AccountFormBase.php

示例3: getWideFormBody

    function getWideFormBody($prefix, $mod = '', $formname = '', $contact = '', $portal = true)
    {
        if (!ACLController::checkAccess('Contacts', 'edit', true)) {
            return '';
        }
        if (empty($contact)) {
            $contact = new Contact();
        }
        global $mod_strings;
        $temp_strings = $mod_strings;
        if (!empty($mod)) {
            global $current_language;
            $mod_strings = return_module_language($current_language, $mod);
        }
        global $app_strings;
        global $current_user;
        global $app_list_strings;
        $primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], $contact->primary_address_country);
        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
        $lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
        $lbl_last_name = $mod_strings['LBL_LAST_NAME'];
        $lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
        $lbl_address = $mod_strings['LBL_PRIMARY_ADDRESS'];
        if (isset($contact->assigned_user_id)) {
            $user_id = $contact->assigned_user_id;
        } else {
            $user_id = $current_user->id;
        }
        //Retrieve Email address and set email1, email2
        $sugarEmailAddress = new SugarEmailAddress();
        $sugarEmailAddress->handleLegacyRetrieve($contact);
        if (!isset($contact->email1)) {
            $contact->email1 = '';
        }
        if (!isset($contact->email2)) {
            $contact->email2 = '';
        }
        if (!isset($contact->email_opt_out)) {
            $contact->email_opt_out = '';
        }
        $lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
        $salutation_options = get_select_options_with_id($app_list_strings['salutation_dom'], $contact->salutation);
        if (isset($contact->lead_source)) {
            $lead_source_options = get_select_options_with_id($app_list_strings['lead_source_dom'], $contact->lead_source);
        } else {
            $lead_source_options = get_select_options_with_id($app_list_strings['lead_source_dom'], '');
        }
        $form = "";
        if ($formname == 'ConvertProspect') {
            $lead_source_label = "<td scope='row'>&nbsp;</td>";
            $lead_source_field = "<td >&nbsp;</td>";
        } else {
            $lead_source_label = "<td scope='row' nowrap>{$mod_strings['LBL_LEAD_SOURCE']}</td>";
            $lead_source_field = "<td ><select name='{$prefix}lead_source'>{$lead_source_options}</select></td>";
        }
        global $timedate;
        $birthdate = '';
        if (!empty($_REQUEST['birthdate'])) {
            $birthdate = $_REQUEST['birthdate'];
        }
        $jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
        $ntc_date_format = $timedate->get_user_date_format();
        $cal_dateformat = $timedate->get_cal_date_format();
        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
        $form .= <<<EOQ
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t<table border='0' celpadding="0" cellspacing="0" width='100%'>
\t\t<tr>
\t\t<td nowrap scope='row'>{$lbl_first_name}</td>
\t\t<td scope='row'>{$lbl_last_name}&nbsp;<span class="required">{$lbl_required_symbol}</span></td>
\t\t<td scope='row' nowrap>{$mod_strings['LBL_TITLE']}</td>
\t\t<td scope='row' nowrap>{$mod_strings['LBL_DEPARTMENT']}</td>
\t\t</tr>
\t\t<tr>
\t\t<td ><select name='{$prefix}salutation'>{$salutation_options}</select>&nbsp;<input name="{$prefix}first_name" type="text" value="{$contact->first_name}"></td>
\t\t<td ><input name='{$prefix}last_name' type="text" value="{$contact->last_name}"></td>
\t\t<td  nowrap><input name='{$prefix}title' type="text" value="{$contact->title}"></td>
\t\t<td  nowrap><input name='{$prefix}department' type="text" value="{$contact->department}"></td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap colspan='4' scope='row'>{$lbl_address}</td>
\t\t</tr>

\t\t<tr>
\t\t<td nowrap colspan='4' ><textarea cols='80' rows='2' name='{$prefix}primary_address_street'>{$contact->primary_address_street}</textarea></td>
\t\t</tr>

\t\t<tr>
\t\t<td scope='row'>{$mod_strings['LBL_CITY']}</td>
\t\t<td scope='row'>{$mod_strings['LBL_STATE']}</td>
\t\t<td scope='row'>{$mod_strings['LBL_POSTAL_CODE']}</td>
\t\t<td scope='row'>{$mod_strings['LBL_COUNTRY']}</td>
\t\t</tr>

\t\t<tr>
\t\t<td ><input name='{$prefix}primary_address_city'  maxlength='100' value='{$contact->primary_address_city}'></td>
\t\t<td ><input name='{$prefix}primary_address_state'  maxlength='100' value='{$contact->primary_address_state}'></td>
\t\t<td ><input name='{$prefix}primary_address_postalcode'  maxlength='100' value='{$contact->primary_address_postalcode}'></td>
\t\t<td ><input name='{$prefix}primary_address_country'  maxlength='100' value='{$contact->primary_address_country}'></td>
//.........这里部分代码省略.........
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:101,代码来源:ContactFormBase.php

示例4: isset

 require_once $beanFiles[$class_name];
 $contact = new $class_name();
 if ($contact->retrieve($_REQUEST['load_id'])) {
     $link_id = $class_name . '_id';
     $focus->{$link_id} = $_REQUEST['load_id'];
     $focus->contact_name = isset($contact->full_name) ? $contact->full_name : $contact->name;
     $focus->to_addrs_names = $focus->contact_name;
     $focus->to_addrs_ids = $_REQUEST['load_id'];
     //Retrieve the email address.
     //If Opportunity or Case then Oppurtinity/Case->Accounts->(email_addr_bean_rel->email_addresses)
     //If Contacts, Leads etc.. then Contact->(email_addr_bean_rel->email_addresses)
     $sugarEmailAddress = new SugarEmailAddress();
     if ($class_name == 'Opportunity' || $class_name == 'aCase') {
         $account = new Account();
         if ($contact->account_id != null && $account->retrieve($contact->account_id)) {
             $sugarEmailAddress->handleLegacyRetrieve($account);
             if (isset($account->email1)) {
                 $focus->to_addrs_emails = $account->email1;
                 $focus->to_addrs = "{$focus->contact_name} <{$account->email1}>";
             }
         }
     } else {
         $sugarEmailAddress->handleLegacyRetrieve($contact);
         if (isset($contact->email1)) {
             $focus->to_addrs_emails = $contact->email1;
             $focus->to_addrs = "{$focus->contact_name} <{$contact->email1}>";
         }
     }
     if (!empty($_REQUEST['parent_type']) && empty($app_list_strings['record_type_display'][$_REQUEST['parent_type']])) {
         if (!empty($app_list_strings['record_type_display'][$_REQUEST['load_module']])) {
             $_REQUEST['parent_type'] = $_REQUEST['load_module'];
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:31,代码来源:EditView.php

示例5: getWideFormBody

    function getWideFormBody($prefix, $mod = '', $formname = '', $contact = '', $portal = true)
    {
        if (!ACLController::checkAccess('Contacts', 'edit', true)) {
            return '';
        }
        if (empty($contact)) {
            $contact = new Contact();
        }
        global $mod_strings;
        $temp_strings = $mod_strings;
        if (!empty($mod)) {
            global $current_language;
            $mod_strings = return_module_language($current_language, $mod);
        }
        global $app_strings;
        global $current_user;
        global $app_list_strings;
        $primary_address_country_options = get_select_options_with_id($app_list_strings['countries_dom'], $contact->primary_address_country);
        $lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
        $lbl_first_name = $mod_strings['LBL_FIRST_NAME'];
        $lbl_last_name = $mod_strings['LBL_LAST_NAME'];
        $lbl_phone = $mod_strings['LBL_OFFICE_PHONE'];
        $lbl_address = $mod_strings['LBL_PRIMARY_ADDRESS'];
        if (isset($contact->assigned_user_id)) {
            $user_id = $contact->assigned_user_id;
        } else {
            $user_id = $current_user->id;
        }
        //Retrieve Email address and set email1, email2
        $sugarEmailAddress = new SugarEmailAddress();
        $sugarEmailAddress->handleLegacyRetrieve($contact);
        if (!isset($contact->email1)) {
            $contact->email1 = '';
        }
        if (!isset($contact->email2)) {
            $contact->email2 = '';
        }
        if (!isset($contact->email_opt_out)) {
            $contact->email_opt_out = '';
        }
        $lbl_email_address = $mod_strings['LBL_EMAIL_ADDRESS'];
        $salutation_options = get_select_options_with_id($app_list_strings['salutation_dom'], $contact->salutation);
        if (isset($contact->lead_source)) {
            $lead_source_options = get_select_options_with_id($app_list_strings['lead_source_dom'], $contact->lead_source);
        } else {
            $lead_source_options = get_select_options_with_id($app_list_strings['lead_source_dom'], '');
        }
        $form = "";
        if ($formname == 'ConvertProspect') {
            $lead_source_label = "<td class='dataLabel'>&nbsp;</td>";
            $lead_source_field = "<td class='dataField'>&nbsp;</td>";
        } else {
            $lead_source_label = "<td class='dataLabel' nowrap>{$mod_strings['LBL_LEAD_SOURCE']}</td>";
            $lead_source_field = "<td class='dataField'><select name='{$prefix}lead_source'>{$lead_source_options}</select></td>";
        }
        $form .= <<<EOQ
\t\t<input type="hidden" name="{$prefix}record" value="">
\t\t<input type="hidden" name="{$prefix}assigned_user_id" value='{$user_id}'>
\t\t<table border='0' celpadding="0" cellspacing="0" width='100%'>
\t\t<tr>
\t\t<td nowrap class='dataLabel'>{$lbl_first_name}</td>
\t\t<td class='dataLabel'>{$lbl_last_name}&nbsp;<span class="required">{$lbl_required_symbol}</span></td>
\t\t<td class='dataLabel' nowrap>{$mod_strings['LBL_TITLE']}</td>
\t\t<td class='dataLabel' nowrap>{$mod_strings['LBL_DEPARTMENT']}</td>
\t\t</tr>
\t\t<tr>
\t\t<td class='dataField'><select name='{$prefix}salutation'>{$salutation_options}</select>&nbsp;<input name="{$prefix}first_name" type="text" value="{$contact->first_name}"></td>
\t\t<td class='dataField'><input name='{$prefix}last_name' type="text" value="{$contact->last_name}"></td>
\t\t<td class='dataField' nowrap><input name='{$prefix}title' type="text" value="{$contact->title}"></td>
\t\t<td class='dataField' nowrap><input name='{$prefix}department' type="text" value="{$contact->department}"></td>
\t\t</tr>
\t\t<tr>
\t\t<td nowrap colspan='4' class='dataLabel'>{$lbl_address}</td>
\t\t</tr>

\t\t<tr>
\t\t<td nowrap colspan='4' class='dataField'><textarea cols='80' rows='2' name='{$prefix}primary_address_street'>{$contact->primary_address_street}</textarea></td>
\t\t</tr>

\t\t<tr>
\t\t<td class='dataLabel'>{$mod_strings['LBL_CITY']}</td>
\t\t<td class='dataLabel'>{$mod_strings['LBL_STATE']}</td>
\t\t<td class='dataLabel'>{$mod_strings['LBL_POSTAL_CODE']}</td>
\t\t<td class='dataLabel'>{$mod_strings['LBL_COUNTRY']}</td>
\t\t</tr>

\t\t<tr>
\t\t<td class='dataField'><input name='{$prefix}primary_address_city'  maxlength='100' value='{$contact->primary_address_city}'></td>
\t\t<td class='dataField'><input name='{$prefix}primary_address_state'  maxlength='100' value='{$contact->primary_address_state}'></td>
\t\t<td class='dataField'><input name='{$prefix}primary_address_postalcode'  maxlength='100' value='{$contact->primary_address_postalcode}'></td>
\t\t<td class='dataField'><select name='{$prefix}primary_address_country' size='1' selected='{$contact->primary_address_country}'>{$primary_address_country_options}</select></td>
\t\t</tr>


\t\t<tr>
\t\t<td nowrap class='dataLabel'>{$lbl_phone}</td>
\t\t<td nowrap class='dataLabel'>{$mod_strings['LBL_MOBILE_PHONE']}</td>
\t\t<td nowrap class='dataLabel'>{$mod_strings['LBL_FAX_PHONE']}</td>
\t\t<td nowrap class='dataLabel'>{$mod_strings['LBL_HOME_PHONE']}</td>
\t\t</tr>
//.........这里部分代码省略.........
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:101,代码来源:ContactFormBase.php

示例6: fill_in_relationship_fields

 /**
  * Populate email address fields here instead of retrieve() so that they are properly available for logic hooks
  *
  * @see parent::fill_in_relationship_fields()
  */
 public function fill_in_relationship_fields()
 {
     parent::fill_in_relationship_fields();
     $this->emailAddress->handleLegacyRetrieve($this);
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:10,代码来源:Person.php


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