本文整理汇总了PHP中Utils_RecordBrowserCommon类的典型用法代码示例。如果您正苦于以下问题:PHP Utils_RecordBrowserCommon类的具体用法?PHP Utils_RecordBrowserCommon怎么用?PHP Utils_RecordBrowserCommon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Utils_RecordBrowserCommon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: applet
public function applet($conf, &$opts)
{
$opts['go'] = true;
$rb = $this->init_module('Utils/RecordBrowser', 'phonecall', 'phonecall');
$me = CRM_ContactsCommon::get_my_record();
if ($me['id'] == -1) {
CRM_ContactsCommon::no_contact_message();
return;
}
$crits = array('employees' => array($me['id']), '!status' => array(2, 3));
if (!isset($conf['past']) || !$conf['past']) {
$crits['>=date_and_time'] = date('Y-m-d 00:00:00');
}
if (!isset($conf['today']) || !$conf['today']) {
$crits['(>=date_and_time'] = date('Y-m-d 00:00:00', strtotime('+1 day'));
$crits['|<date_and_time'] = date('Y-m-d 00:00:00');
}
if ($conf['future'] != -1) {
$crits['<=date_and_time'] = date('Y-m-d 23:59:59', strtotime('+' . $conf['future'] . ' day'));
}
$conds = array(array(array('field' => 'contact_name', 'width' => 14), array('field' => 'phone_number', 'width' => 20), array('field' => 'status', 'width' => 8)), $crits, array('status' => 'ASC', 'date_and_time' => 'ASC', 'priority' => 'DESC'), array('CRM_PhoneCallCommon', 'applet_info_format'), 15, $conf, &$opts);
$date = $this->get_module_variable('applet_date', date('Y-m-d H:i:s'));
$opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('phonecall', array('date_and_time' => $date, 'employees' => array($me['id']), 'permission' => '0', 'status' => '0', 'priority' => CRM_CommonCommon::get_default_priority()));
$this->display_module($rb, $conds, 'mini_view');
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:25,代码来源:PhoneCall_0.php
示例2: install
public function install()
{
Base_AclCommon::add_permission(_M('View Activity Report'), array('ACCESS:employee', 'ACCESS:manager'));
Base_ThemeCommon::install_default_theme($this->get_type());
Utils_RecordBrowserCommon::new_addon('contact', 'Apps/ActivityReport', 'contact_addon', array('Apps_ActivityReportCommon', 'contact_addon_label'));
return true;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:ActivityReportInstall.php
示例3: uninstall
public function uninstall()
{
$ret = true;
Utils_RecordBrowserCommon::uninstall_recordset('quick_search');
Utils_RecordBrowserCommon::unregister_processing_callback('quick_search', array('Applets_QuickSearchCommon', 'parse_values'));
return $ret;
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:QuickSearchInstall.php
示例4: create_contact
public function create_contact($r)
{
global $OUTPUT;
$mail = $r['record']['email'];
require_once dirname(__FILE__) . '/epesi_contacts_addressbook_backend.php';
$contacts = new epesi_contacts_addressbook_backend('CRM Contacts');
$ret = $contacts->search('email', $mail, true, false);
if (count($ret->records)) {
$OUTPUT->show_message('contactexists', 'warning');
} else {
require_once dirname(__FILE__) . '/epesi_companies_addressbook_backend.php';
$companies = new epesi_companies_addressbook_backend('CRM Companies');
$ret = $companies->search('email', $mail, true, false);
if (count($ret->records)) {
$OUTPUT->show_message('contactexists', 'warning');
} else {
if (isset($r['record']['firstname']) && $r['record']['firstname'] !== "" && isset($r['record']['surname']) && $r['record']['surname'] !== "") {
$name = array($r['record']['firstname'], $r['record']['surname']);
} else {
$name = explode(' ', $r['record']['name'], 2);
}
if (count($name) < 2) {
$OUTPUT->show_message('errorsavingcontact', 'warning');
} else {
$loc = Base_RegionalSettingsCommon::get_default_location();
Utils_RecordBrowserCommon::new_record('contact', array('first_name' => $name[0], 'last_name' => $name[1], 'email' => $mail, 'permission' => 0, 'country' => $loc['country']));
$OUTPUT->show_message('addedsuccessfully', 'confirmation');
}
}
}
$OUTPUT->send();
// return array('abort'=>true);
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:33,代码来源:epesi_addressbook.php
示例5: uninstall
public function uninstall()
{
Utils_RecordBrowserCommon::delete_record_field('company', 'County');
Utils_RecordBrowserCommon::delete_record_field('contact', 'County');
Utils_RecordBrowserCommon::delete_record_field('contact', 'Home County');
return true;
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:CountyInstall.php
示例6: format_values
protected function format_values($tab, $record_id)
{
$rb_obj = new RBO_RecordsetAccessor($tab);
$record = $rb_obj->get_record($record_id);
if (!$record) {
return array();
}
$access = Utils_RecordBrowserCommon::get_access($tab, 'view', $record);
if (!$access) {
return array();
}
// use RB object instance for better display callback compatibility
// some of them uses Utils_RecordBrowser::$rb_obj instance
$rb = ModuleManager::new_instance('Utils_RecordBrowser', null, 'rb');
$rb->construct($tab);
$rb->init($tab);
$fields = Utils_RecordBrowserCommon::init($tab);
$printable_data = array();
foreach ($fields as $f) {
if ($access[$f['id']]) {
$printable_data[] = array('label' => _V($f['name']), 'value' => $record->get_val($f['id'], true));
}
}
// fill rows - it's easier here than in template
if ($this->fill_empty_rows()) {
while (count($printable_data) % $this->cols() != 0) {
$printable_data[] = array('label' => '', 'value' => '');
}
}
return $printable_data;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:31,代码来源:RecordPrinter.php
示例7: uninstall
public function uninstall() {
Utils_RecordBrowserCommon::delete_addon('company', 'Tests/Bugtrack', 'company_bugtrack_addon');
Utils_AttachmentCommon::delete_addon('bugtrack');
Utils_RecordBrowserCommon::uninstall_recordset('bugtrack');
Utils_CommonDataCommon::remove('Bugtrack_Status');
return true;
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:BugtrackInstall.php
示例8: uninstall
public function uninstall()
{
Base_ThemeCommon::uninstall_default_theme('CRM/Contacts/Activities');
Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Contacts/Activities', 'company_activities');
Utils_RecordBrowserCommon::delete_addon('contact', 'CRM/Contacts/Actitivies', 'contact_activities');
return true;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:7,代码来源:ActivitiesInstall.php
示例9: applet
public function applet($conf, &$opts)
{
$opts['go'] = true;
$opts['title'] = __('Meetings');
$me = CRM_ContactsCommon::get_my_record();
if ($me['id'] == -1) {
CRM_ContactsCommon::no_contact_message();
return;
}
$closed = isset($conf['closed']) && $conf['closed'];
$related = $conf['related'];
$rb = $this->init_module('Utils/RecordBrowser', 'crm_meeting', 'crm_meeting');
$crits = array();
if (!$closed) {
$crits['!status'] = array(2, 3);
}
if ($related == 0) {
$crits['employees'] = array($me['id']);
}
if ($related == 1) {
$crits['customers'] = array($me['id']);
}
if ($related == 2) {
$crits['(employees'] = array($me['id']);
$crits['|customers'] = array($me['id']);
}
$conds = array(array(array('field' => 'title', 'width' => 14, 'callback' => array('CRM_MeetingCommon', 'display_title_with_mark')), array('field' => 'status', 'width' => 4)), $crits, array('date' => 'ASC', 'time' => 'ASC', 'status' => 'ASC', 'priority' => 'DESC'), array('CRM_MeetingCommon', 'applet_info_format'), 15, $conf, &$opts);
$opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('crm_meeting', array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority(), 'date' => $this->get_module_variable('date', date('Y-m-d')), 'time' => $this->get_module_variable('time', date('H:i:s')), 'duration' => 3600));
$this->display_module($rb, $conds, 'mini_view');
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:30,代码来源:Meeting_0.php
示例10: display_company
public static function display_company($record, $nolink = false)
{
$def = Utils_RecordBrowserCommon::create_linked_label_r('company', 'Company Name', $record, $nolink);
if (!$def) {
return '---';
}
return $def;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:8,代码来源:ReportCommon_0.php
示例11: uninstall
public function uninstall()
{
Base_ThemeCommon::uninstall_default_theme($this->get_type());
Utils_RecordBrowserCommon::delete_addon('contact', 'CRM/Contacts/NotesAggregate', 'contact_addon');
Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Contacts/NotesAggregate', 'company_addon');
Utils_RecordBrowserCommon::delete_addon('premium_salesopportunity', 'CRM/Contacts/NotesAggregate', 'salesopportunity_addon');
return true;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:8,代码来源:NotesAggregateInstall.php
示例12: search_format
public static function search_format($id)
{
$row = Utils_RecordBrowserCommon::get_records('bugtrack', array('id' => $id));
if (!$row) {
return false;
}
$row = array_pop($row);
return Utils_RecordBrowserCommon::record_link_open_tag('bugtrack', $row['id']) . __('Bug (attachment) #%d, %s', array($row['id'], $row['project_name'])) . Utils_RecordBrowserCommon::record_link_close_tag();
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:9,代码来源:BugtrackCommon_0.php
示例13: uninstall
public function uninstall()
{
Base_ThemeCommon::uninstall_default_theme('CRM/Contacts/Activities');
Utils_RecordBrowserCommon::set_tpl('contact', Base_ThemeCommon::get_template_filename('CRM/Contacts', 'Contact'));
Utils_RecordBrowserCommon::unregister_processing_callback('contact', array('CRM_Contacts_PhotoCommon', 'submit_contact'));
$this->remove_data_dir();
DB::DropTable(CRM_Contacts_PhotoCommon::table_name);
return true;
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:9,代码来源:PhotoInstall.php
示例14: user_label
public static function user_label($id)
{
$label = Base_UserCommon::get_user_login($id);
$c = Utils_RecordBrowserCommon::get_id('contact', 'login', $id);
if ($c) {
$label = CRM_ContactsCommon::contact_format_no_company($c, true) . ' [' . $label . ']';
}
return $label;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:9,代码来源:LoginAuditCommon_0.php
示例15: uninstall
public function uninstall()
{
CRM_CalendarCommon::delete_event_handler('Tasks');
CRM_RoundcubeCommon::delete_addon('task');
Utils_AttachmentCommon::delete_addon('task');
Base_ThemeCommon::uninstall_default_theme(CRM_TasksInstall::module_name());
Utils_RecordBrowserCommon::unregister_processing_callback('task', array('CRM_TasksCommon', 'submit_task'));
Utils_RecordBrowserCommon::uninstall_recordset('task');
return true;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:10,代码来源:TasksInstall.php
示例16: uninstall
public function uninstall()
{
CRM_CalendarCommon::delete_event_handler('Phonecalls');
CRM_RoundcubeCommon::delete_addon('phonecall');
Base_ThemeCommon::uninstall_default_theme(CRM_PhoneCallInstall::module_name());
Utils_AttachmentCommon::delete_addon('phonecall');
Utils_AttachmentCommon::persistent_mass_delete('phonecall/');
Utils_RecordBrowserCommon::unregister_processing_callback('phonecall', array('CRM_PhoneCallCommon', 'submit_phonecall'));
Utils_RecordBrowserCommon::uninstall_recordset('phonecall');
return true;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:11,代码来源:PhoneCallInstall.php
示例17: uninstall
public function uninstall()
{
Utils_AttachmentCommon::delete_addon('crm_meeting');
Utils_RecordBrowserCommon::delete_addon('crm_meeting', CRM_MeetingInstall::module_name(), 'messanger_addon');
CRM_RoundcubeCommon::delete_addon('crm_meeting');
CRM_CalendarCommon::delete_event_handler('Meetings');
Base_ThemeCommon::uninstall_default_theme(CRM_MeetingInstall::module_name());
Utils_RecordBrowserCommon::uninstall_recordset('crm_meeting');
Utils_RecordBrowserCommon::unregister_processing_callback('crm_meeting', array('CRM_MeetingCommon', 'submit_meeting'));
return true;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:11,代码来源:MeetingInstall.php
示例18: get_tax_details
public static function get_tax_details()
{
static $cache = null;
if ($cache === null) {
$cache = array();
$r = Utils_RecordBrowserCommon::get_records('data_tax_rates');
foreach ($r as $v) {
$cache[$v['id']] = $v;
}
}
return $cache;
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:12,代码来源:TaxRatesCommon_0.php
示例19: uninstall
public function uninstall()
{
Base_ThemeCommon::uninstall_default_theme($this->get_type());
Utils_CommonDataCommon::remove('crm_assets_category');
Utils_CommonDataCommon::remove('crm_assets_monitor_type');
Utils_CommonDataCommon::remove('crm_assets_printer_type');
Utils_RecordBrowserCommon::delete_addon('company', 'CRM/Assets', 'assets_addon');
Utils_AttachmentCommon::delete_addon('crm_assets');
Utils_AttachmentCommon::persistent_mass_delete('crm_assets');
Utils_RecordBrowserCommon::uninstall_recordset('crm_assets');
Utils_RecordBrowserCommon::unregister_processing_callback('crm_assets', array('CRM_AssetsCommon', 'process_request'));
return true;
}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:13,代码来源:AssetsInstall.php
示例20: body
public function body()
{
if (!Base_AclCommon::check_permission('Dashboard')) {
return;
}
$this->help('Dashboard Help', 'main');
if (Utils_RecordBrowserInstall::is_installed()) {
//speed up links to RB
if (Utils_RecordBrowserCommon::check_for_jump()) {
return;
}
}
$this->dashboard();
Base_ActionBarCommon::show_quick_access_shortcuts(true);
}
开发者ID:cretzu89,项目名称:EPESI,代码行数:15,代码来源:Dashboard_0.php
注:本文中的Utils_RecordBrowserCommon类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论