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


PHP Utils_RecordBrowserCommon::applet_new_record_button方法代码示例

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


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

示例3: applet

 public function applet($conf, &$opts)
 {
     //available applet options: toggle,href,title,go,go_function,go_arguments,go_contruct_arguments
     $opts['go'] = 1;
     $mode = 'contact';
     $rb = $this->init_module('Utils/RecordBrowser', $mode, $mode);
     $conds = array(array(array('field' => 'last_name', 'width' => 10), array('field' => 'first_name', 'width' => 10), array('field' => 'company_name', 'width' => 10)), array(':Recent' => 1), array(':Visited_on' => 'DESC', 'last_name' => 'ASC', 'first_name' => 'ASC', 'company_name' => 'ASC'), array('CRM_ContactsCommon', 'applet_info_format'), 15, $conf, &$opts);
     $opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('contact', array('country' => Base_User_SettingsCommon::get('Base_RegionalSettings', 'default_country'), 'zone' => Base_User_SettingsCommon::get('Base_RegionalSettings', 'default_state'), 'permission' => '0', 'home_country' => Base_User_SettingsCommon::get('Base_RegionalSettings', 'default_country'), 'home_zone' => Base_User_SettingsCommon::get('Base_RegionalSettings', 'default_state')));
     $this->display_module($rb, $conds, 'mini_view');
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:10,代码来源:Contacts_0.php

示例4: applet

 public function applet($conf, &$opts)
 {
     $opts['go'] = true;
     $opts['title'] = __('Tasks') . ($conf['related'] == 0 ? ' - ' . __('Todo') : '') . ($conf['related'] == 1 ? ' - ' . __('Related') : '') . ($conf['term'] == 's' ? ' - ' . __('Short-term') : ($conf['term'] == 'l' ? ' - ' . __('Long-term') : ''));
     $me = CRM_ContactsCommon::get_my_record();
     if ($me['id'] == -1) {
         CRM_ContactsCommon::no_contact_message();
         return;
     }
     $short = $conf['term'] == 's' || $conf['term'] == 'b';
     $long = $conf['term'] == 'l' || $conf['term'] == 'b';
     $related = $conf['related'];
     $rb = $this->init_module(Utils_RecordBrowser::module_name(), 'task', 'task');
     $status = array();
     foreach (Utils_CommonDataCommon::get_array('CRM/Status') as $status_id => $label) {
         if (isset($conf['status_' . $status_id]) && $conf['status_' . $status_id]) {
             $status[] = $status_id;
         }
     }
     $crits = array();
     $crits['status'] = $status;
     if ($short && !$long) {
         $crits['!longterm'] = 1;
     }
     if (!$short && $long) {
         $crits['longterm'] = 1;
     }
     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' => 20, 'callback' => array('CRM_TasksCommon', 'display_title_with_mark')), array('field' => 'deadline', 'width' => 10), array('field' => 'status', 'width' => 6)), $crits, array('deadline' => 'ASC', 'status' => 'ASC', 'priority' => 'DESC'), array('CRM_TasksCommon', 'applet_info_format'), 15, $conf, &$opts);
     $opts['actions'][] = Utils_RecordBrowserCommon::applet_new_record_button('task', array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority()));
     $this->display_module($rb, $conds, 'mini_view');
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:41,代码来源:Tasks_0.php


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