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


PHP Utils_RecordBrowserCommon::new_record_field方法代码示例

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


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

示例1: install

 public function install()
 {
     $fields = array('name' => _M('County'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country', 'Zone'), 'extra' => false, 'QFfield_callback' => array('CRM_Contacts_CountyCommon', 'QFfield_county'), 'position' => 'Zone');
     Utils_RecordBrowserCommon::new_record_field('company', $fields);
     $fields = array('name' => _M('County'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Country', 'Zone'), 'extra' => false, 'QFfield_callback' => array('CRM_Contacts_CountyCommon', 'QFfield_county'), 'position' => 'Zone');
     Utils_RecordBrowserCommon::new_record_field('contact', $fields);
     $fields = array('name' => _M('Home County'), 'type' => 'commondata', 'required' => false, 'param' => array('Countries', 'Home Country', 'Home Zone'), 'extra' => false, 'QFfield_callback' => array('CRM_Contacts_CountyCommon', 'QFfield_county'), 'position' => 'Home Zone');
     Utils_RecordBrowserCommon::new_record_field('contact', $fields);
     $hc_pos = DB::GetOne('SELECT position FROM contact_field WHERE field=\'Home City\'');
     $bd_pos = DB::GetOne('SELECT position FROM contact_field WHERE field=\'Birth Date\'');
     if ($hc_pos + 1 < $bd_pos) {
         DB::Execute('UPDATE contact_field SET position = position+1 WHERE position>%d AND position<%d', array($hc_pos, $bd_pos));
         DB::Execute('UPDATE contact_field SET position = %d WHERE field=\'Birth Date\'', array($hc_pos));
     }
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:16,代码来源:CountyInstall.php

示例2: install

 public function install()
 {
     //addons table
     $fields = array(array('name' => _M('Recordset'), 'type' => 'text', 'param' => 64, 'display_callback' => array($this->get_type() . 'Common', 'display_recordset'), 'QFfield_callback' => array($this->get_type() . 'Common', 'QFfield_recordset'), 'required' => true, 'extra' => false, 'visible' => true));
     Utils_RecordBrowserCommon::install_new_recordset('phonecall_related', $fields);
     Utils_RecordBrowserCommon::set_caption('phonecall_related', _M('Phonecalls Related Recordsets'));
     Utils_RecordBrowserCommon::register_processing_callback('phonecall_related', array('CRM_PhoneCallCommon', 'processing_related'));
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'view', 'ACCESS:employee');
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'add', 'ADMIN');
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'edit', 'SUPERADMIN');
     Utils_RecordBrowserCommon::add_access('phonecall_related', 'delete', 'SUPERADMIN');
     // ************ phone calls ************** //
     Base_ThemeCommon::install_default_theme(CRM_PhoneCallInstall::module_name());
     $fields = array(array('name' => _M('Subject'), 'type' => 'text', 'required' => true, 'param' => '64', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_subject')), array('name' => _M('Contact Name'), 'type' => 'hidden', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_contact_name')), array('name' => _M('Phone Number'), 'type' => 'hidden', 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_phone_number')), array('name' => _M('Customer'), 'type' => 'crm_company_contact', 'param' => array('field_type' => 'select'), 'extra' => false), array('name' => _M('Other Customer'), 'type' => 'checkbox', 'extra' => false, 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_other_contact')), array('name' => _M('Other Customer Name'), 'type' => 'text', 'param' => '64', 'extra' => false), array('name' => _M('Permission'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Access'), 'extra' => false), array('name' => _M('Employees'), 'type' => 'crm_contact', 'param' => array('field_type' => 'multiselect', 'crits' => array('CRM_PhoneCallCommon', 'employees_crits'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => true, 'extra' => false, 'visible' => true, 'filter' => true), array('name' => _M('Status'), 'type' => 'commondata', 'required' => true, 'filter' => true, 'param' => array('order_by_key' => true, 'CRM/Status'), 'extra' => false, 'visible' => true, 'display_callback' => array('CRM_PhoneCallCommon', 'display_status')), array('name' => _M('Priority'), 'type' => 'commondata', 'required' => true, 'param' => array('order_by_key' => true, 'CRM/Priority'), 'extra' => false), array('name' => _M('Phone'), 'type' => 'integer', 'extra' => false, 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_phone'), 'display_callback' => array('CRM_PhoneCallCommon', 'display_phone')), array('name' => _M('Other Phone'), 'type' => 'checkbox', 'extra' => false, 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_other_phone')), array('name' => _M('Other Phone Number'), 'type' => 'text', 'param' => '64', 'extra' => false), array('name' => _M('Date and Time'), 'type' => 'timestamp', 'required' => true, 'extra' => false, 'visible' => true), array('name' => _M('Description'), 'type' => 'long text', 'required' => false, 'param' => '255', 'extra' => false), array('name' => _M('Related'), 'type' => 'multiselect', 'QFfield_callback' => array('CRM_PhoneCallCommon', 'QFfield_related'), 'param' => '__RECORDSETS__::;CRM_PhoneCallCommon::related_crits', 'extra' => false, 'required' => false, 'visible' => true));
     Utils_RecordBrowserCommon::install_new_recordset('phonecall', $fields);
     Utils_RecordBrowserCommon::set_tpl('phonecall', Base_ThemeCommon::get_template_filename(CRM_PhoneCallInstall::module_name(), 'default'));
     Utils_RecordBrowserCommon::register_processing_callback('phonecall', array('CRM_PhoneCallCommon', 'submit_phonecall'));
     Utils_RecordBrowserCommon::set_icon('phonecall', Base_ThemeCommon::get_template_filename(CRM_PhoneCallInstall::module_name(), 'icon.png'));
     Utils_RecordBrowserCommon::set_recent('phonecall', 5);
     Utils_RecordBrowserCommon::set_caption('phonecall', _M('Phonecalls'));
     Utils_RecordBrowserCommon::enable_watchdog('phonecall', array('CRM_PhoneCallCommon', 'watchdog_label'));
     Utils_RecordBrowserCommon::set_search('phonecall', 2, 0);
     // ************ addons ************** //
     Utils_AttachmentCommon::new_addon('phonecall');
     Utils_RecordBrowserCommon::new_addon('phonecall', CRM_PhoneCallInstall::module_name(), 'messanger_addon', _M('Alerts'));
     CRM_RoundcubeCommon::new_addon('phonecall');
     // ************ other ************** //
     CRM_CalendarCommon::new_event_handler(_M('Phonecalls'), array('CRM_PhoneCallCommon', 'crm_calendar_handler'));
     Utils_BBCodeCommon::new_bbcode('phone', 'CRM_PhoneCallCommon', 'phone_bbcode');
     if (ModuleManager::is_installed('Premium_SalesOpportunity') >= 0) {
         Utils_RecordBrowserCommon::new_record_field('phonecall', _M('Opportunity'), 'select', true, false, 'premium_salesopportunity::Opportunity Name;Premium_SalesOpportunityCommon::crm_opportunity_reference_crits', '', false);
     }
     Utils_RecordBrowserCommon::add_access('phonecall', 'view', 'ACCESS:employee', array('(!permission' => 2, '|employees' => 'USER'));
     Utils_RecordBrowserCommon::add_access('phonecall', 'add', 'ACCESS:employee');
     Utils_RecordBrowserCommon::add_access('phonecall', 'edit', 'ACCESS:employee', array('(permission' => 0, '|employees' => 'USER', '|customer' => 'USER'));
     Utils_RecordBrowserCommon::add_access('phonecall', 'delete', 'ACCESS:employee', array(':Created_by' => 'USER_ID'));
     Utils_RecordBrowserCommon::add_access('phonecall', 'delete', array('ACCESS:employee', 'ACCESS:manager'));
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:39,代码来源:PhoneCallInstall.php

示例3: view_field


//.........这里部分代码省略.........
                                    $change_param = true;
								} else if ($action == 'add') {
								    $data['rset'] = '__RECORDSETS__';
								    $data['label_field'] = '';
                                    $change_param = true;
								}
                                if ($change_param) {
                                    $props[0] = $data['rset'].'::'.$data['label_field'];
                                    $param = implode(';', $props);
                                } else {
                                    $param = $row['param'];
                                }
							}
							if (isset($row) && isset($row['type']) && $row['type']=='multiselect' && $data['select_type']=='select') {
								$ret = DB::Execute('SELECT id, f_'.$id.' AS v FROM '.$this->tab.'_data_1 WHERE f_'.$id.' IS NOT NULL');
								while ($rr = $ret->FetchRow()) {
									$v = Utils_RecordBrowserCommon::decode_multi($rr['v']);
									$v = array_pop($v);
									DB::Execute('UPDATE '.$this->tab.'_data_1 SET f_'.$id.'=%s WHERE id=%d', array($v, $rr['id']));
								}
							}
							if (isset($row) && isset($row['type'])  && $row['type']!='multiselect' && $data['select_type']=='multiselect') {
								if(DB::is_postgresql())
									DB::Execute('ALTER TABLE '.$this->tab.'_data_1 ALTER COLUMN f_'.$id.' TYPE TEXT');
								else
									DB::Execute('ALTER TABLE '.$this->tab.'_data_1 MODIFY f_'.$id.' TEXT');
								$ret = DB::Execute('SELECT id, f_'.$id.' AS v FROM '.$this->tab.'_data_1 WHERE f_'.$id.' IS NOT NULL');
								while ($rr = $ret->FetchRow()) {
									$v = Utils_RecordBrowserCommon::encode_multi($rr['v']);
									DB::Execute('UPDATE '.$this->tab.'_data_1 SET f_'.$id.'=%s WHERE id=%d', array($v, $rr['id']));
								}
							}
							break;
                case 'time':
                case 'timestamp':
                    $param = $data['minute_increment'];
                    break;
				default:	if (isset($row) && isset($row['param']))
								$param = $row['param'];
							break;
			}
            if ($action=='add') {
                $id = $new_id;
                if (in_array($data['select_data_type'], array('time','timestamp','currency','integer')))
                    $style = $data['select_data_type'];
                else
                    $style = '';
                $new_field_data = array('name' => $data['field'], 'type' => $data['select_data_type'], 'param' => $param, 'style' => $style);
                if (isset($this->admin_field['position']) && $this->admin_field['position']) {
                    $new_field_data['position'] = (int) $this->admin_field['position'];
                }
                Utils_RecordBrowserCommon::new_record_field($this->tab, $new_field_data);
            }
            if(!isset($data['visible']) || $data['visible'] == '') $data['visible'] = 0;
            if(!isset($data['required']) || $data['required'] == '') $data['required'] = 0;
            if(!isset($data['filter']) || $data['filter'] == '') $data['filter'] = 0;
            if(!isset($data['export']) || $data['export'] == '') $data['export'] = 0;
            if(!isset($data['tooltip']) || $data['tooltip'] == '') $data['tooltip'] = 0;

            foreach($data as $key=>$val)
                if (is_string($val)) $data[$key] = htmlspecialchars($val);

/*            DB::StartTrans();
            if ($id!=$new_id) {
                Utils_RecordBrowserCommon::check_table_name($this->tab);
                if(DB::is_postgresql())
                    DB::Execute('ALTER TABLE '.$this->tab.'_data_1 RENAME COLUMN f_'.$id.' TO f_'.$new_id);
                else {
                    $old_param = DB::GetOne('SELECT param FROM '.$this->tab.'_field WHERE field=%s', array($field));
                    DB::RenameColumn($this->tab.'_data_1', 'f_'.$id, 'f_'.$new_id, Utils_RecordBrowserCommon::actual_db_type($type, $old_param));
                }
            }*/
            DB::Execute('UPDATE '.$this->tab.'_field SET caption=%s, param=%s, type=%s, field=%s, visible=%d, required=%d, filter=%d, export=%d, tooltip=%d WHERE field=%s',
                        array($data['caption'], $param, $data['select_data_type'], $data['field'], $data['visible'], $data['required'], $data['filter'], $data['export'], $data['tooltip'], $field));
/*            DB::Execute('UPDATE '.$this->tab.'_edit_history_data SET field=%s WHERE field=%s',
                        array($new_id, $id));
            DB::CompleteTrans();*/
			
			DB::Execute('DELETE FROM '.$this->tab.'_callback WHERE freezed=1 AND field=%s', array($field));
			if ($data['display_callback'])
				DB::Execute('INSERT INTO '.$this->tab.'_callback (callback,freezed,field) VALUES (%s,1,%s)', array($data['display_callback'], $data['field']));
				
			DB::Execute('DELETE FROM '.$this->tab.'_callback WHERE freezed=0 AND field=%s', array($field));
			if ($data['QFfield_callback'])
				DB::Execute('INSERT INTO '.$this->tab.'_callback (callback,freezed,field) VALUES (%s,0,%s)', array($data['QFfield_callback'], $data['field']));
			
            $this->init(true, true);
            return false;
        }
        $form->display_as_column();

		eval_js('RB_hide_form_fields();');
		eval_js('RB_advanced_confirmation = "'.Epesi::escapeJS(__('Changing these settings may often cause system unstability. Are you sure you want to see advanced settings?')).'";');
		eval_js('RB_advanced_settings();');

		Base_ActionBarCommon::add('save', __('Save'), $form->get_submit_form_href());
		Base_ActionBarCommon::add('back', __('Cancel'), $this->create_back_href());
		
        return true;
    }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:101,代码来源:RecordBrowser_0.php

示例4: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
//addons table
$fields = array(array('name' => _M('Recordset'), 'type' => 'text', 'param' => 64, 'display_callback' => array('CRM_TasksCommon', 'display_recordset'), 'QFfield_callback' => array('CRM_TasksCommon', 'QFfield_recordset'), 'required' => true, 'extra' => false, 'visible' => true));
Utils_RecordBrowserCommon::install_new_recordset('task_related', $fields);
Utils_RecordBrowserCommon::set_caption('task_related', _M('Meeting Related Recordsets'));
Utils_RecordBrowserCommon::register_processing_callback('task_related', array('CRM_TasksCommon', 'processing_related'));
Utils_RecordBrowserCommon::add_access('task_related', 'view', 'ACCESS:employee');
Utils_RecordBrowserCommon::add_access('task_related', 'add', 'ADMIN');
Utils_RecordBrowserCommon::add_access('task_related', 'edit', 'SUPERADMIN');
Utils_RecordBrowserCommon::add_access('task_related', 'delete', 'SUPERADMIN');
Utils_RecordBrowserCommon::new_record_field('task', array('name' => _M('Related'), 'type' => 'multiselect', 'param' => '__RECORDSETS__::;CRM_TasksCommon::related_crits', 'QFfield_callback' => array('CRM_TasksCommon', 'QFfield_related'), 'extra' => false, 'required' => false, 'visible' => true));
开发者ID:cretzu89,项目名称:EPESI,代码行数:13,代码来源:20141218_related.php

示例5: install

 public function install()
 {
     Utils_RecordBrowserCommon::new_record_field('company', array('name' => _M('Parent Company'), 'type' => 'crm_company', 'param' => array('field_type' => 'select', 'crits' => array('CRM_Contacts_ParentCompanyCommon', 'parent_company_crits')), 'required' => false, 'extra' => false, 'visible' => true, 'filter' => true, 'position' => 'Phone'));
     Utils_RecordBrowserCommon::new_addon('company', 'CRM_Contacts_ParentCompany', 'parent_company_addon', _M('Child Companies'));
     return true;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:6,代码来源:ParentCompanyInstall.php

示例6: new_record_field

 /**
  * Add new field to RecordSet.
  * @param array|RBO_FieldDefinition $definition Field definition
  */
 public function new_record_field($definition)
 {
     if ($definition instanceof RBO_FieldDefinition) {
         $definition = $definition->get_definition();
     }
     Utils_RecordBrowserCommon::new_record_field($this->tab, $definition);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:11,代码来源:Recordset.php

示例7: install

 public function install()
 {
     Utils_RecordBrowserCommon::new_record_field('company', array('name' => _M('Account Manager'), 'type' => 'crm_contact', 'param' => array('field_type' => 'select', 'crits' => array('CRM_Contacts_AccountManagerCommon', 'crits_accountmanager'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => false, 'extra' => false, 'filter' => true, 'visible' => true));
     Utils_RecordBrowserCommon::new_browse_mode_details_callback('company', 'CRM/Contacts/AccountManager', 'browse_mode_details');
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:6,代码来源:AccountManagerInstall.php

示例8: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
$deadline_field_is_not_timestamp = !DB::GetOne('SELECT 1 FROM task_field WHERE field=%s AND type=%s', array('Deadline', 'timestamp'));
if ($deadline_field_is_not_timestamp) {
    PatchUtil::db_alter_column('task_data_1', 'f_deadline', 'T');
    DB::Execute('UPDATE task_field SET type=%s WHERE field=%s', array('timestamp', 'Deadline'));
}
$tab = 'task';
$field = array('name' => _M('Timeless'), 'type' => 'checkbox', 'required' => false, 'extra' => false, 'position' => 'Deadline', 'QFfield_callback' => 'CRM_TasksCommon::QFfield_timeless');
Utils_RecordBrowserCommon::new_record_field($tab, $field);
$deadline_time_field_exists = DB::GetOne('SELECT 1 FROM task_field WHERE field=%s', array('Deadline Time'));
$sql = false;
if ($deadline_time_field_exists) {
    if (DB::is_mysql()) {
        $sql = 'UPDATE task_data_1 SET f_deadline = TIMESTAMP(f_deadline, TIME(f_deadline_time)), f_timeless = (f_deadline_time IS NULL)';
    } else {
        $sql = 'UPDATE task_data_1 SET f_deadline = f_deadline + CAST(f_deadline_time as time), f_timeless = (f_deadline_time IS NULL)::int';
    }
} elseif ($deadline_field_is_not_timestamp) {
    if (DB::is_mysql()) {
        $sql = 'UPDATE task_data_1 SET f_deadline = TIMESTAMP(f_deadline, \'12:00:00\'), f_timeless = 1';
    } else {
        $sql = 'UPDATE task_data_1 SET f_deadline = f_deadline + CAST(\'12:00:00\' as time), f_timeless = 1';
    }
}
if ($sql) {
    DB::Execute($sql);
}
if ($deadline_time_field_exists) {
    Utils_RecordBrowserCommon::delete_record_field('task', 'Deadline Time');
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:20151109_timeless_task.php

示例9: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
Utils_RecordBrowserCommon::new_record_field('rc_accounts', array('name' => _M('Use EPESI Archive directories'), 'type' => 'checkbox', 'extra' => true, 'visible' => false));
DB::Execute('UPDATE rc_accounts_data_1 SET f_use_epesi_archive_directories=1');
开发者ID:cretzu89,项目名称:EPESI,代码行数:5,代码来源:20120724_use_epesi_archive_dir.php

示例10: array

         $r2 = DB::Execute('SELECT * FROM contact_data_1 WHERE f_login=%d', array($row['id']));
         while ($r = $r2->FetchRow()) {
             if (!$r['f_access']) {
                 $gr = '__mrm__';
             } else {
                 $gr = $r['f_access'] . 'mrm__';
             }
             DB::Execute('UPDATE contact_data_1 SET f_access=%s WHERE id=%d', array($gr, $r['id']));
         }
     }
 }
 Acl::del_group('Medical Record Manager');
 Utils_RecordBrowserCommon::new_record_field('contact', array('name' => _M('View'), 'type' => 'crm_contact', 'param' => array('field_type' => 'multiselect', 'crits' => array('Custom_CADES_AccessRestrictionsCommon', 'employee_crits'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => false, 'extra' => true, 'filter' => false, 'visible' => false));
 Utils_RecordBrowserCommon::new_record_field('contact', array('name' => _M('Edit'), 'type' => 'crm_contact', 'param' => array('field_type' => 'multiselect', 'crits' => array('Custom_CADES_AccessRestrictionsCommon', 'employee_crits'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => false, 'extra' => true, 'filter' => false, 'visible' => false));
 Utils_RecordBrowserCommon::new_record_field('contact', array('name' => _M('Add'), 'type' => 'crm_contact', 'param' => array('field_type' => 'multiselect', 'crits' => array('Custom_CADES_AccessRestrictionsCommon', 'employee_crits'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => false, 'extra' => true, 'filter' => false, 'visible' => false));
 Utils_RecordBrowserCommon::new_record_field('contact', array('name' => _M('Delete'), 'type' => 'crm_contact', 'param' => array('field_type' => 'multiselect', 'crits' => array('Custom_CADES_AccessRestrictionsCommon', 'employee_crits'), 'format' => array('CRM_ContactsCommon', 'contact_format_no_company')), 'required' => false, 'extra' => true, 'filter' => false, 'visible' => false));
 // migrate data
 if (Utils_RecordBrowserCommon::check_table_name('cades_access_control', false, false)) {
     $recs = DB::Execute('SELECT * FROM cades_access_control_data_1 WHERE active=1');
     $perms = array();
     $rm_acl = array();
     $count = 0;
     $done = 0;
     while ($r = $recs->FetchRow()) {
         if (!isset($rm_acl[$r['f_patient']])) {
             $rm_acl[$r['f_patient']] = array();
         }
         $rm_acl[$r['f_patient']][] = $r['id'];
         $field = Utils_RecordBrowserCommon::get_field_id(Utils_CommonDataCommon::get_value('CADES/AccessLevel/' . $r['f_permission_level']));
         $fields = explode('_', $field);
         foreach ($fields as $field) {
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:RB_permissions2.php

示例11: array

<?php

$rs_checkpoint = Patch::checkpoint('recordset');
if (!$rs_checkpoint->is_done()) {
    Patch::require_time(5);
    //addons table
    $fields = array(array('name' => _M('Recordset'), 'type' => 'text', 'param' => 64, 'display_callback' => array('CRM_RoundcubeCommon', 'display_recordset'), 'QFfield_callback' => array('CRM_RoundcubeCommon', 'QFfield_recordset'), 'required' => true, 'extra' => false, 'visible' => true));
    Utils_RecordBrowserCommon::install_new_recordset('rc_related', $fields);
    Utils_RecordBrowserCommon::set_caption('rc_related', _M('Mail Related Recordsets'));
    Utils_RecordBrowserCommon::register_processing_callback('rc_related', array('CRM_RoundcubeCommon', 'processing_related'));
    Utils_RecordBrowserCommon::add_access('rc_related', 'view', 'ACCESS:employee');
    Utils_RecordBrowserCommon::add_access('rc_related', 'add', 'ADMIN');
    Utils_RecordBrowserCommon::add_access('rc_related', 'edit', 'SUPERADMIN');
    Utils_RecordBrowserCommon::add_access('rc_related', 'delete', 'SUPERADMIN');
    Utils_RecordBrowserCommon::new_record_field('rc_mails', array('name' => _M('Related'), 'type' => 'multiselect', 'QFfield_callback' => array('CRM_RoundcubeCommon', 'QFfield_related'), 'param' => '__RECORDSETS__::;CRM_RoundcubeCommon::related_crits', 'extra' => false, 'required' => false, 'visible' => true, 'position' => 'Employee'));
    Utils_RecordBrowserCommon::new_record('rc_related', array('recordset' => 'company'));
    Utils_RecordBrowserCommon::new_record('rc_related', array('recordset' => 'contact'));
    Utils_RecordBrowserCommon::add_access('rc_mails', 'edit', 'ACCESS:employee', array(), array('subject', 'employee', 'date', 'headers_data', 'body', 'from', 'to', 'thread', 'message_id', 'references'));
    $rs_checkpoint->done();
}
Patch::set_message('Processing addons');
$old_checkpoint = Patch::checkpoint('old');
if (!$old_checkpoint->is_done()) {
    $old = $old_checkpoint->get('old', array());
    if (empty($old) && ModuleManager::is_installed('Premium/RoundcubeCustomAddons') >= 0) {
        $old = Utils_RecordBrowserCommon::get_records('premium_roundcube_custom_addon');
        ModuleManager::uninstall('Premium/RoundcubeCustomAddons');
    }
    foreach ($old as $i => $r) {
        if ($r['recordset'] == 'company' || $r['recordset'] == 'contact') {
            continue;
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:20150119_related.php

示例12: array

<?php

Utils_RecordBrowserCommon::new_record_field('task', array('name' => _M('Deadline Time'), 'type' => 'time', 'required' => false, 'extra' => false, 'visible' => true, 'position' => 'Deadline'));
Utils_RecordBrowserCommon::set_display_callback('task', 'Deadline', array('CRM_TasksCommon', 'display_deadline'));
开发者ID:cretzu89,项目名称:EPESI,代码行数:4,代码来源:20150226_deadline_time.php

示例13: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
Utils_RecordBrowserCommon::new_record_field('utils_attachment', array('name' => _M('Attached to'), 'type' => 'calculated', 'extra' => false, 'display_callback' => array('Utils_AttachmentCommon', 'display_attached_to')));
开发者ID:cretzu89,项目名称:EPESI,代码行数:4,代码来源:20140604_attached_to.php

示例14: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
if (DB::GetOne('SELECT 1 FROM utils_attachment_field WHERE field=%s', array('Date'))) {
    Utils_RecordBrowserCommon::new_record_field('utils_attachment', array('name' => _M('Edited on'), 'type' => 'timestamp', 'extra' => false, 'visible' => true, 'required' => false, 'display_callback' => array('Utils_AttachmentCommon', 'display_date'), 'QFfield_callback' => array('Utils_AttachmentCommon', 'QFfield_date'), 'position' => 'Date'));
    DB::Execute('UPDATE utils_attachment_data_1 SET f_edited_on=f_date');
    Utils_RecordBrowserCommon::delete_record_field('utils_attachment', 'Date');
    Utils_RecordBrowserCommon::wipe_access('utils_attachment');
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'view', 'ACCESS:employee', array('(!permission' => 2, '|:Created_by' => 'USER_ID'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'delete', 'ACCESS:employee', array(':Created_by' => 'USER_ID'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'delete', array('ACCESS:employee', 'ACCESS:manager'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'add', 'ACCESS:employee', array(), array('edited_on'));
    Utils_RecordBrowserCommon::add_access('utils_attachment', 'edit', 'ACCESS:employee', array('(permission' => 0, '|:Created_by' => 'USER_ID'), array('edited_on'));
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:14,代码来源:20140621_date_to_timestamp.php

示例15: defined

<?php

defined("_VALID_ACCESS") || die('Direct access forbidden');
Utils_RecordBrowserCommon::new_record_field('rc_mails', array('name' => _M('Message ID'), 'type' => 'text', 'param' => 128, 'extra' => false, 'visible' => false, 'required' => false, 'QFfield_callback' => array('CRM_RoundcubeCommon', 'QFfield_hidden')));
Utils_RecordBrowserCommon::new_record_field('rc_mails', array('name' => _M('References'), 'type' => 'text', 'param' => 128, 'extra' => false, 'visible' => false, 'required' => false, 'QFfield_callback' => array('CRM_RoundcubeCommon', 'QFfield_hidden')));
开发者ID:cretzu89,项目名称:EPESI,代码行数:5,代码来源:20130221_add_references_mail_columns.php


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