• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Dashlet类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: display

 function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('lbl_campaign_name', translate('LBL_TOP_CAMPAIGNS_NAME', 'Campaigns'));
     $ss->assign('lbl_revenue', translate('LBL_TOP_CAMPAIGNS_REVENUE', 'Campaigns'));
     $ss->assign('top_campaigns', $this->top_campaigns);
     return parent::display() . $ss->fetch('modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl');
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:8,代码来源:TopCampaignsDashlet.php


示例2: addDashlet

 public function addDashlet(Dashlet $dashlet)
 {
     $dashlet->ParentID = $this->ID;
     // get all dashlets and figure out a posX and posY
     $all = $this->Widgets();
     $maxY = 0;
     foreach ($all as $d) {
         if ($d->PosY > $maxY) {
             $maxY = $d->PosY + 1;
         }
     }
     $dashlet->PosY = $maxY > 1 ? $maxY : 1;
     $dashlet->write();
 }
开发者ID:nyeholt,项目名称:silverstripe-frontend-dashboards,代码行数:14,代码来源:MemberDashboard.php


示例3: getDashletFields

 public function getDashletFields()
 {
     $fields = parent::getDashletFields();
     $fields->push(MultiSelect2Field::create('Calendars', 'Calendars')->setSource(Calendar::get()->map()->toArray())->setMultiple(true));
     $fields->push(CheckboxField::create('OnlyUpcoming'));
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-intranet-sis,代码行数:7,代码来源:EventDashlet.php


示例4: getDashletFields

 public function getDashletFields()
 {
     $fields = parent::getDashletFields();
     $all = PostTag::get()->map('Title', 'Title')->toArray();
     $fields->insertAfter(MultiValueTextField::create('FilterTags', 'Tags to filter by', $all), 'Title');
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-microblog,代码行数:7,代码来源:TimelineDashlet.php


示例5: getDashletFields

 public function getDashletFields()
 {
     $fields = parent::getDashletFields();
     $input = new TextField('Days', 'Past Number of Days');
     $input->setAttribute('Placeholder', 'Days');
     $fields->push($input);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-intranet-sis,代码行数:8,代码来源:InteractionDashlet.php


示例6: display

 /**
  * @see Dashlet::display()
  */
 public function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('lblTotalOpportunities', translate('LBL_TOTAL_OPPORTUNITIES', 'Opportunities'));
     $ss->assign('lblClosedWonOpportunities', translate('LBL_CLOSED_WON_OPPORTUNITIES', 'Opportunities'));
     $ss->assign('total_opportunities', $this->total_opportunities);
     $ss->assign('total_opportunities_won', $this->total_opportunities_won);
     return parent::display() . $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl');
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:12,代码来源:MyClosedOpportunitiesDashlet.php


示例7: displayOptions

 function displayOptions()
 {
     global $app_strings, $mod_strings;
     $ss = new Sugar_Smarty();
     $ss->assign('MOD', $this->dashletStrings);
     $ss->assign('title', $this->title);
     $ss->assign('view', $this->view);
     $ss->assign('id', $this->id);
     return parent::displayOptions() . $ss->fetch('modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:10,代码来源:CalendarDashlet.php


示例8: getDashletFields

 public function getDashletFields()
 {
     $fields = parent::getDashletFields();
     $input = new TextField('PageName', 'Page');
     $input->setAttribute('Placeholder', 'Page Name');
     $fields->push($input);
     $static = new CheckboxField('DisplayLinks', 'Display Selected Links?');
     $fields->push($static);
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-intranet-sis,代码行数:10,代码来源:ViewingDashlet.php


示例9: getDashletFields

 public function getDashletFields()
 {
     $fields = parent::getDashletFields();
     if (Permission::check('ADMIN')) {
         $types = ClassInfo::subclassesFor('Page');
         $types = array_combine($types, $types);
         ksort($types);
         $fields->push(new DropdownField('ListType', _t('RecentDashlet.LIST_TYPE', 'List Items of Type'), $types));
     }
     return $fields;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-frontend-dashboards,代码行数:11,代码来源:RecentDashlet.php


示例10: display

 public function display()
 {
     $data = array();
     $ss = new Sugar_Smarty();
     $focus = BeanFactory::getBean('TeamNotices');
     $today = db_convert("'" . TimeDate::getInstance()->nowDbDate() . "'", 'date');
     $query = $focus->create_new_list_query("date_start", $focus->table_name . ".date_start <= {$today} and " . $focus->table_name . ".date_end >= {$today} and " . $focus->table_name . '.status=\'Visible\'');
     if ($result = $focus->db->query($query)) {
         while ($row = $focus->db->fetchByAssoc($result)) {
             $data[] = $row;
         }
     }
     $ss->assign("data", $data);
     return parent::display() . $ss->fetch('modules/TeamNotices/Dashlets/TeamNoticesDashlet/TeamNoticesDashlet.tpl');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:15,代码来源:TeamNoticesDashlet.php


示例11: displayOptions

 function displayOptions()
 {
     global $app_strings;
     $ss = new Sugar_Smarty();
     $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']);
     $ss->assign('countLbl', $this->dashletStrings['LBL_CONFIGURE_COUNT']);
     $ss->assign('containerLbl', $this->dashletStrings['LBL_CONFIGURE_CONTAINER']);
     $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']);
     $ss->assign('title', $this->title);
     $container = ReportContainer::get_category_select_options();
     asort($container);
     $ss->assign('containerSelect', get_select_options_with_id($container, $this->container_id));
     $ss->assign('count', $this->count);
     $ss->assign('id', $this->id);
     return parent::displayOptions() . $ss->fetch('modules/ZuckerReports/Dashlets/ZuckerReportContainerDashlet/ZuckerReportContainerDashletOptions.tpl');
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:16,代码来源:ZuckerReportContainerDashlet.php


示例12: displayOptions

 /**
  * Displays the configuration form for the dashlet
  * 
  * @return string html to display form
  */
 public function displayOptions()
 {
     global $app_strings;
     $ss = new Sugar_Smarty();
     $this->dashletStrings['LBL_SAVE'] = $app_strings['LBL_SAVE_BUTTON_LABEL'];
     $ss->assign('lang', $this->dashletStrings);
     $ss->assign('id', $this->id);
     $ss->assign('title', $this->title);
     $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']);
     if ($this->isAutoRefreshable()) {
         $ss->assign('isRefreshable', true);
         $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']);
         $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions());
         $ss->assign('autoRefreshSelect', $this->autoRefresh);
     }
     $str = $ss->fetch('modules/SugarFavorites/Dashlets/SugarFavoritesDashlet/SugarFavoritesDashletOptions.tpl');
     return Dashlet::displayOptions() . $str;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:23,代码来源:SugarFavoritesDashlet.php


示例13: displayOptions

 function displayOptions()
 {
     global $app_strings;
     $seed = new RunnableReport();
     $list = $seed->get_full_list("name", "report_result_type='INLINE'");
     $select = array();
     if (!empty($list)) {
         foreach ($list as $bean) {
             $select[$bean->id] = $bean->get_summary_text();
         }
     }
     asort($select);
     $ss = new Sugar_Smarty();
     $ss->assign('runnableLbl', $this->dashletStrings['LBL_CONFIGURE_RUNNABLE']);
     $ss->assign('runnableSelect', get_select_options_with_id($select, $this->runnable_id));
     $ss->assign('id', $this->id);
     return parent::displayOptions() . $ss->fetch('modules/ZuckerReports/Dashlets/ZuckerReportDisplayDashlet/ZuckerReportDisplayDashletOptions.tpl');
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:18,代码来源:ZuckerReportDisplayDashlet.php


示例14: AORReportsDashlet

 function AORReportsDashlet($id, $def = array())
 {
     global $current_user, $app_strings;
     parent::Dashlet($id);
     $this->isConfigurable = true;
     $this->def = $def;
     if (empty($def['dashletTitle'])) {
         $this->title = translate('LBL_AOR_REPORTS_DASHLET', 'AOR_Reports');
     } else {
         $this->title = $def['dashletTitle'];
     }
     $this->params = array();
     if (!empty($def['parameter_id'])) {
         foreach ($def['parameter_id'] as $key => $parameterId) {
             $this->params[$parameterId] = array('id' => $parameterId, 'operator' => $def['parameter_operator'][$key], 'type' => $def['parameter_type'][$key], 'value' => $def['parameter_value'][$key]);
         }
     }
     if (!empty($def['aor_report_id'])) {
         $this->report = BeanFactory::getBean('AOR_Reports', $def['aor_report_id']);
         $this->report->user_parameters = $this->params;
     }
     $this->onlyCharts = !empty($def['onlyCharts']);
     $this->charts = !empty($def['charts']) ? $def['charts'] : array();
 }
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:24,代码来源:AORReportsDashlet.php


示例15: display

 /**
  * Displays the dashlet
  * 
  * @return string html to display dashlet
  */
 function display()
 {
     require_once "modules/Reports/Report.php";
     //		ini_set('display_errors', 'false');
     $chartReport = new SavedReport();
     $chartExists = $chartReport->retrieve($this->report_id, false);
     if (!is_null($chartExists)) {
         $this->title = $chartReport->name;
         $reporter = new Report($chartReport->content);
         $reporter->is_saved_report = true;
         $reporter->saved_report_id = $chartReport->id;
         $reporter->get_total_header_row();
         $reporter->run_chart_queries();
         require_once "modules/Reports/templates/templates_chart.php";
         ob_start();
         template_chart($reporter, true, true, $this->id);
         $str = ob_get_contents();
         ob_end_clean();
         $xmlFile = get_cache_file_name($reporter);
         $html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
         $ss = new Sugar_Smarty();
         $ss->assign('chartName', $this->id);
         $ss->assign('chartXMLFile', $xmlFile);
         $script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
         $json = getJSONobj();
         return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
     }
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:35,代码来源:ChartsDashlet.php


示例16: display

 /**
  * Displays the Dashlet, must call process() prior to calling this
  *
  * @return string HTML that displays Dashlet
  */
 public function display()
 {
     return parent::display() . $this->processAutoRefresh();
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:9,代码来源:DashletGenericChart.php


示例17: display

 /**
  * Displays the Dashlet, must call process() prior to calling this
  *
  * @return string HTML that displays Dashlet
  */
 function display()
 {
     return parent::display() . $this->lvs->display(false) . $this->processAutoRefresh();
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:9,代码来源:DashletGeneric.php


示例18: loadDashletInstance

 public function loadDashletInstance($dasInsUid)
 {
     try {
         $dashletInstance = $this->load($dasInsUid);
         //Load data from the serialized field
         $dashlet = new Dashlet();
         $dashletFields = $dashlet->load($dashletInstance['DAS_UID']);
         if (is_null($dashletFields)) {
             $dashletFields = array();
         }
         return array_merge($dashletFields, $dashletInstance);
     } catch (Exception $error) {
         throw $error;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:15,代码来源:class.pmDashlet.php


示例19: displayOptions

 /**
  * Displays the configuration form for the dashlet
  * 
  * @return string html to display form
  */
 public function displayOptions()
 {
     global $app_strings, $sugar_version, $sugar_config;
     $ss = new Sugar_Smarty();
     $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']);
     $ss->assign('heightLbl', $this->dashletStrings['LBL_CONFIGURE_HEIGHT']);
     $ss->assign('rssUrlLbl', $this->dashletStrings['LBL_CONFIGURE_RSSURL']);
     $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']);
     $ss->assign('title', $this->title);
     $ss->assign('height', $this->height);
     $ss->assign('url', $this->url);
     $ss->assign('id', $this->id);
     return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl');
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:19,代码来源:RSSDashlet.php


示例20: getAdditionalFields

 public function getAdditionalFields($data)
 {
     $this->setResponseType('json');
     $result = new stdclass();
     $result->status = 'OK';
     try {
         $dashlet = new Dashlet();
         $dashletFields = $dashlet->load($data->DAS_UID);
         if (!is_null($dashletFields)) {
             $result->additionalFields = PMDashlet::getAdditionalFields($dashletFields['DAS_CLASS']);
         } else {
             throw new Exception('Dashlet "' . $data->DAS_UID . '" does not exist.');
         }
     } catch (Exception $error) {
         $result->status = 'ERROR';
         $result->message = $error->getMessage();
     }
     return $result;
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:19,代码来源:dashboard.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP DashletGeneric类代码示例发布时间:2022-05-23
下一篇:
PHP DashboardController类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap