當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Dashlet類代碼示例

本文整理匯總了PHP中Dashlet的典型用法代碼示例。如果您正苦於以下問題:PHP Dashlet類的具體用法?PHP Dashlet怎麽用?PHP Dashlet使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Dashlet類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的Dashlet類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。