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


PHP Dashlet::Dashlet方法代码示例

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


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

示例1: MyLeadsByStatusDashlet

 function MyLeadsByStatusDashlet($id, $options)
 {
     global $timedate;
     parent::Dashlet($id);
     $this->isConfigurable = true;
     $this->isRefreshable = true;
     if (empty($options['myleadschart_date_start'])) {
         $this->myleadschart_date_start = date($timedate->get_db_date_time_format(), strtotime('2008-01-01'));
     } else {
         $this->myleadschart_date_start = $options['myleadschart_date_start'];
     }
     if (empty($options['myleadschart_date_end'])) {
         $this->myleadschart_date_end = date($timedate->get_db_date_time_format(), time());
     } else {
         $this->myleadschart_date_end = $options['myleadschart_date_end'];
     }
     if (empty($options['myleadschart_status'])) {
         $this->myleadschart_status = array();
     } else {
         $this->myleadschart_status = $options['myleadschart_status'];
     }
     if (empty($options['title'])) {
         $this->title = translate('LBL_MY_LEAD_PIPELINE_FORM_TITLE', 'Charts');
     } else {
         $this->title = $options['title'];
     }
 }
开发者ID:JeremyHutchings,项目名称:SugarCRM-Chart-XML-generator,代码行数:27,代码来源:MyLeadsByStatusDashlet.php

示例2: JotPadDashlet

 /**
  * Constructor
  *
  * @global string current language
  * @param guid $id id for the current dashlet (assigned from Home module)
  * @param array $def options saved for this dashlet
  */
 function JotPadDashlet($id, $def)
 {
     $this->loadLanguage('JotPadDashlet');
     // load the language strings here
     if (!empty($def['savedText'])) {
         // load default text is none is defined
         $this->savedText = $def['savedText'];
     } else {
         $this->savedText = $this->dashletStrings['LBL_DEFAULT_TEXT'];
     }
     if (!empty($def['height'])) {
         // set a default height if none is set
         $this->height = $def['height'];
     }
     parent::Dashlet($id);
     // call parent constructor
     $this->isConfigurable = true;
     // dashlet is configurable
     $this->hasScript = true;
     // dashlet has javascript attached to it
     // if no custom title, use default
     if (empty($def['title'])) {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     } else {
         $this->title = $def['title'];
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:34,代码来源:JotPadDashlet.php

示例3: SpotsDashlet

 /**
  * Constructor.
  *
  * @global string current language
  *
  * @param guid  $id  id for the current dashlet (assigned from Home module)
  * @param array $def options saved for this dashlet
  */
 public function SpotsDashlet($id, $def)
 {
     $this->loadLanguage('SpotsDashlet', 'modules/Spots/Dashlets/');
     // load the language strings here
     $this->isRefreshable = false;
     if (!empty($def['spotId'])) {
         $this->spotId = $def['spotId'];
     } else {
         $this->spotId = '';
     }
     if (!empty($def['showGui']) && $def['showGui'] === 'on') {
         $this->showGui = 1;
     } else {
         $this->showGui = 0;
     }
     parent::Dashlet($id);
     // call parent constructor
     $this->isConfigurable = true;
     // dashlet is configurable
     $this->hasScript = true;
     // dashlet has javascript attached to it
     // if no custom title, use default
     if (empty($def['title'])) {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     } else {
         $this->title = $def['title'];
     }
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:36,代码来源:SpotsDashlet.php

示例4: MyPipelineBySalesStageDashlet

 function MyPipelineBySalesStageDashlet($id, $options)
 {
     global $timedate;
     parent::Dashlet($id);
     $this->isConfigurable = true;
     $this->isRefreshable = false;
     if (empty($options['mypbss_date_start'])) {
         $this->mypbss_date_start = date($timedate->get_date_format(), time());
     } else {
         $this->mypbss_date_start = $options['mypbss_date_start'];
     }
     if (empty($options['mypbss_date_end'])) {
         $this->mypbss_date_end = date($timedate->get_date_format(), strtotime('2010-01-01'));
     } else {
         $this->mypbss_date_end = $options['mypbss_date_end'];
     }
     if (empty($options['mypbss_sales_stages'])) {
         $this->mypbss_sales_stages = array();
     } else {
         $this->mypbss_sales_stages = $options['mypbss_sales_stages'];
     }
     if (empty($options['title'])) {
         $this->title = translate('LBL_PIPELINE_FORM_TITLE', 'Home');
     }
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:25,代码来源:MyPipelineBySalesStageDashlet.php

示例5: __construct

 /**
  * Constructor 
  * 
  * @global string current language
  * @param guid $id id for the current dashlet (assigned from Home module)
  * @param array $def options saved for this dashlet
  */
 public function __construct($id, $def)
 {
     $this->loadLanguage('RSSDashlet', 'modules/Home/Dashlets/');
     // load the language strings here
     if (!empty($def['height'])) {
         // set a default height if none is set
         $this->height = $def['height'];
     }
     if (!empty($def['url'])) {
         $this->url = $def['url'];
     }
     if (!empty($def['title'])) {
         $this->title = $def['title'];
     } else {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     }
     if (isset($def['autoRefresh'])) {
         $this->autoRefresh = $def['autoRefresh'];
     }
     parent::Dashlet($id);
     // call parent constructor
     $this->isConfigurable = true;
     // dashlet is configurable
     $this->hasScript = false;
     // dashlet has javascript attached to it
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:33,代码来源:RSSDashlet.php

示例6: iFrameDashlet

 function iFrameDashlet($id, $options = null)
 {
     parent::Dashlet($id);
     $this->isConfigurable = true;
     if (!empty($options['titleLabel'])) {
         $this->title = translate($options['titleLabel'], 'Home');
     } else {
         if (empty($options['title'])) {
             $this->title = translate('LBL_DASHLET_TITLE', 'Home');
             $this->title = translate('LBL_DASHLET_DISCOVER_SUGAR_PRO', 'Home');
         } else {
             $this->title = $options['title'];
         }
     }
     if (empty($options['url'])) {
         $this->url = $this->defaultURL;
         $this->url = 'http://apps.sugarcrm.com/dashlet/go-pro.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@';
     } else {
         $this->url = $options['url'];
     }
     $this->checkURL();
     if (empty($options['height']) || (int) $options['height'] < 1) {
         $this->height = 315;
     } else {
         $this->height = (int) $options['height'];
     }
     if (isset($options['autoRefresh'])) {
         $this->autoRefresh = $options['autoRefresh'];
     }
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:30,代码来源:iFrameDashlet.php

示例7: iFrameDashlet

 function iFrameDashlet($id, $options = null)
 {
     parent::Dashlet($id);
     $this->isConfigurable = true;
     if (!empty($options['titleLabel'])) {
         $this->title = translate($options['titleLabel'], 'Home');
     } else {
         if (empty($options['title'])) {
             $this->title = translate('LBL_DASHLET_TITLE', 'Home');
         } else {
             $this->title = $options['title'];
         }
     }
     if (empty($options['url'])) {
         $this->url = $this->defaultURL;
     } else {
         $this->url = $options['url'];
     }
     $this->checkURL();
     if (empty($options['height']) || (int) $options['height'] < 1) {
         $this->height = 315;
     } else {
         $this->height = (int) $options['height'];
     }
     if (isset($options['autoRefresh'])) {
         $this->autoRefresh = $options['autoRefresh'];
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:iFrameDashlet.php

示例8: TrackerDashlet

 /**
  * Constructor
  *
  * @global string current language
  * @param guid $id id for the current dashlet (assigned from Home module)
  * @param array $def options saved for this dashlet
  */
 function TrackerDashlet($id, $def)
 {
     $this->loadLanguage('TrackerDashlet', 'modules/Trackers/Dashlets/');
     // load the language strings here
     if (!empty($def['height'])) {
         // set a default height if none is set
         $this->height = $def['height'];
     }
     parent::Dashlet($id);
     // call parent constructor
     $this->isConfigurable = true;
     // dashlet is configurable
     $this->hasScript = true;
     // dashlet has javascript attached to it
     // if no custom title, use default
     if (empty($def['title'])) {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     } else {
         $this->title = $def['title'];
     }
     if (isset($def['autoRefresh'])) {
         $this->autoRefresh = $def['autoRefresh'];
     }
     $this->tReporter = new TrackerReporter();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:32,代码来源:TrackerDashlet.php

示例9: __construct

 /**
  * Constructor
  *
  * @param int   $id
  * @param array $options
  */
 public function __construct($id, array $options = null)
 {
     parent::Dashlet($id);
     if (isset($options)) {
         foreach ($options as $key => $value) {
             $this->{$key} = $value;
         }
     }
     // load searchfields
     $classname = get_class($this);
     if (is_file("modules/Charts/Dashlets/{$classname}/{$classname}.data.php")) {
         require "modules/Charts/Dashlets/{$classname}/{$classname}.data.php";
         $this->_searchFields = $dashletData[$classname]['searchFields'];
     }
     // load language files
     $this->loadLanguage($classname, 'modules/Charts/Dashlets/');
     if (empty($options['title'])) {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     }
     if (isset($options['autoRefresh'])) {
         $this->autoRefresh = $options['autoRefresh'];
     }
     $this->layoutManager = new LayoutManager();
     $this->layoutManager->setAttribute('context', 'Report');
     // fake a reporter object here just to pass along the db type used in many widgets.
     // this should be taken out when sugarwidgets change
     $temp = (object) array('db' => &$GLOBALS['db'], 'report_def_str' => '');
     $this->layoutManager->setAttributePtr('reporter', $temp);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:35,代码来源:DashletGenericChart.php

示例10: iFrameDashlet

 function iFrameDashlet($id, $options = null)
 {
     parent::Dashlet($id);
     $this->isConfigurable = true;
     if (empty($this->title)) {
         $this->title = translate('LBL_DASHLET_TITLE', 'Home');
         $this->title = translate('LBL_DASHLET_DISCOVER_SUGAR_PRO', 'Home');
     }
     if (!empty($options['titleLabel'])) {
         $this->title = translate($options['titleLabel'], 'Home');
     } elseif (!empty($options['title'])) {
         $this->title = $options['title'];
     }
     if (empty($options['url'])) {
         $this->url = $this->defaultURL;
         $this->url = 'https://suitecrm.com/';
     } else {
         $this->url = $options['url'];
     }
     if (empty($options['height']) || (int) $options['height'] < 1) {
         $this->height = 315;
     } else {
         $this->height = (int) $options['height'];
     }
     if (isset($options['autoRefresh'])) {
         $this->autoRefresh = $options['autoRefresh'];
     }
 }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:28,代码来源:iFrameDashlet.php

示例11: ZuckerReportDisplayDashlet

 function ZuckerReportDisplayDashlet($id, $def)
 {
     $this->loadLanguage('ZuckerReportDisplayDashlet', 'modules/ZuckerReports/Dashlets/');
     parent::Dashlet($id);
     global $theme;
     $theme_path = "themes/" . $theme . "/";
     require_once $theme_path . 'layout_utils.php';
     $this->isConfigurable = true;
     $this->hasScript = false;
     $this->runnable_id = $def['runnable_id'];
     $this->title = $this->dashletStrings['LBL_NOTITLE'];
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:12,代码来源:ZuckerReportDisplayDashlet.php

示例12: ChartsDashlet

 /**
  * Constructor 
  * 
  * @global string current language
  * @param guid $id id for the current dashlet (assigned from Home module)
  * @param report_id $report_id id of the saved report
  * @param array $def options saved for this dashlet
  */
 function ChartsDashlet($id, $report_id, $def)
 {
     $this->report_id = $report_id;
     $this->loadLanguage('ChartsDashlet');
     // load the language strings here
     parent::Dashlet($id);
     // call parent constructor
     $this->searchFields = array();
     $this->isConfigurable = true;
     // dashlet is configurable
     $this->hasScript = true;
     // dashlet has javascript attached to it
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:21,代码来源:ChartsDashlet.php

示例13: CalendarDashlet

 function CalendarDashlet($id, $def)
 {
     $this->loadLanguage('CalendarDashlet', 'modules/Calendar/Dashlets/');
     parent::Dashlet($id);
     $this->isConfigurable = true;
     $this->hasScript = true;
     if (empty($def['title'])) {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     } else {
         $this->title = $def['title'];
     }
     if (!empty($def['view'])) {
         $this->view = $def['view'];
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:15,代码来源:CalendarDashlet.php

示例14: CalendarDashlet

 function CalendarDashlet($id, $def)
 {
     $this->loadLanguage('CalendarDashlet', 'modules/Calendar/Dashlets/');
     parent::Dashlet($id);
     $this->isConfigurable = true;
     $this->hasScript = true;
     if (empty($def['title'])) {
         $this->title = $this->dashletStrings['LBL_TITLE'];
     } else {
         $this->title = $def['title'];
     }
     if (!empty($def['view'])) {
         $this->view = $def['view'];
     }
     // seedBean is need to set the calendar icon
     $this->seedBean = BeanFactory::newBean('Calendar');
     $this->seedBean->module_name = 'Calendar';
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:18,代码来源:CalendarDashlet.php

示例15: TopCampaignsDashlet

 function TopCampaignsDashlet($id, $def = null)
 {
     global $current_user, $app_strings;
     parent::Dashlet($id);
     $this->isConfigurable = false;
     $this->isRefreshable = true;
     if (empty($def['title'])) {
         $this->title = translate('LBL_TOP_CAMPAIGNS', 'Campaigns');
     }
     $this->seedBean = new Opportunity();
     $qry = "SELECT C.name AS campaign_name, SUM(O.amount) AS revenue, C.id as campaign_id " . "FROM campaigns C, opportunities O " . "WHERE C.id = O.campaign_id " . "AND O.sales_stage = 'Closed Won' " . "GROUP BY C.name,C.id ORDER BY revenue desc";
     $result = $this->seedBean->db->limitQuery($qry, 0, 10);
     $row = $this->seedBean->db->fetchByAssoc($result);
     while ($row != null) {
         array_push($this->top_campaigns, $row);
         $row = $this->seedBean->db->fetchByAssoc($result);
     }
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:18,代码来源:TopCampaignsDashlet.php


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