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


PHP Dashboard类代码示例

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


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

示例1: home

 private function home()
 {
     if (!eval(Hooks::get('HOME'))) {
         return;
     }
     NewVersionCheck::getNews();
     $dashboard = new Dashboard($this->_siteID);
     $placedRS = $dashboard->getPlacements();
     $calendar = new Calendar($this->_siteID);
     $upcomingEventsHTML = $calendar->getUpcomingEventsHTML(7, UPCOMING_FOR_DASHBOARD);
     $calendar = new Calendar($this->_siteID);
     $upcomingEventsFupHTML = $calendar->getUpcomingEventsHTML(7, UPCOMING_FOR_DASHBOARD_FUP);
     /* Important cand datagrid */
     $dataGridProperties = array('rangeStart' => 0, 'maxResults' => 15, 'filterVisible' => false);
     $dataGrid = DataGrid::get("home:ImportantPipelineDashboard", $dataGridProperties);
     $this->_template->assign('dataGrid', $dataGrid);
     $dataGridProperties = array('rangeStart' => 0, 'maxResults' => 15, 'filterVisible' => false);
     /* Only show a month of activities. */
     $dataGridProperties['startDate'] = '';
     $dataGridProperties['endDate'] = '';
     $dataGridProperties['period'] = 'DATE_SUB(CURDATE(), INTERVAL 1 MONTH)';
     $dataGrid2 = DataGrid::get("home:CallsDataGrid", $dataGridProperties);
     $this->_template->assign('dataGrid2', $dataGrid2);
     $this->_template->assign('active', $this);
     $this->_template->assign('placedRS', $placedRS);
     $this->_template->assign('upcomingEventsHTML', $upcomingEventsHTML);
     $this->_template->assign('upcomingEventsFupHTML', $upcomingEventsFupHTML);
     $this->_template->assign('wildCardQuickSearch', '');
     $this->_template->display('./modules/home/Home.tpl');
 }
开发者ID:PublicityPort,项目名称:OpenCATS,代码行数:30,代码来源:HomeUI.php

示例2: initForUser

 public static function initForUser($id)
 {
     foreach (array('Salon', 'Cuisine', 'Chambre', 'Garage', 'Système') as $room) {
         $entity = new Dashboard();
         $entity->create();
         $entity->user = $id;
         $entity->label = $room;
         $entity->default = 0;
         $entity->save();
     }
     $entity = new Dashboard();
     $entity->create();
     $entity->user = $id;
     $entity->label = "Général";
     $entity->default = 1;
     $entity->save();
     $dashboard = $entity->id;
     $entity = new Widget();
     $entity->create();
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_profil\',	\'null\',	\'0\',	\'0\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_ram\',	\'null\',	\'0\',	\'1\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_system\',	\'null\',	\'0\',	\'2\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_network\',	\'null\',	\'0\',	\'2\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_hdd\',	\'null\',	\'3\',	\'1\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_disk\',	\'null\',	\'0\',	\'1\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_gpio\',	\'null\',	\'1\',	\'0\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_services\',	\'null\',	\'0\',	\'2\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_users\',	\'null\',	\'0\',	\'0\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_ram\',	\'null\',	\'0\',	\'1\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_vocal\',	\'null\',	\'1\',	\'2\',	\'\',\'' . $dashboard . '\');');
     $entity->customQuery('INSERT INTO "yana_plugin_dashboard" ("model", "data", "cell", "column", "minified","dashboard") VALUES (\'dash_monitoring_logs\',	\'null\',	\'1\',	\'2\',	\'\',\'' . $dashboard . '\');');
     return $dashboard;
 }
开发者ID:rikimaruneo,项目名称:yana-server,代码行数:33,代码来源:Dashboard.class.php

示例3: Index

 public function Index()
 {
     $dashboard = new Dashboard();
     $quick_links = new StaticContentEGlet(new SimpleRenderer());
     $quick_links->setTemplate('eglets/admin_quick_links.tpl');
     $dashboard->addEGlet('Quick Links', $quick_links);
     $this->view->register('dashboard', $dashboard);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:8,代码来源:IndexController.php

示例4: testRenderWithOneWidget

 public function testRenderWithOneWidget()
 {
     $kernelMock = $this->mockFactory->getKernelMock();
     $kernelMock->expects($this->any())->method('getConfig')->will($this->returnValue(array('widgets' => array(array('name' => 'test')), 'template' => 'test')));
     $kernelMock->expects($this->once())->method('findFileOnPath')->will($this->returnValue(__DIR__ . '/../../templates/empty.phtml'));
     $widgetMock = $this->getWidgetMock($kernelMock);
     $widgetProviderMock = $this->getWidgetMockProvider($kernelMock);
     $widgetProviderMock->injectMock($widgetMock);
     $dashboard = new Dashboard($kernelMock, $widgetProviderMock);
     $dashboard->render();
 }
开发者ID:hoborglabs,项目名称:dashboard,代码行数:11,代码来源:DashboardTest.php

示例5: map

 /** mappatura proprietà dashboard  */
 public static function map(Dashboard $dashboard, array $properties)
 {
     if (array_key_exists('IDCLIENTE', $properties)) {
         $dashboard->set_idcliente($properties['IDCLIENTE']);
     }
     if (array_key_exists('CODICE', $properties)) {
         $dashboard->set_codice($properties['CODICE']);
     }
     if (array_key_exists('VALORE', $properties)) {
         $dashboard->set_valore($properties['VALORE']);
     }
 }
开发者ID:blackvalmiki,项目名称:SmAPP,代码行数:13,代码来源:DashboardMapper.php

示例6: filter_dashboard_dates

 public function filter_dashboard_dates()
 {
     $data = $_POST;
     $dash = new Dashboard();
     $resp = new ajax_response($data['action'], true);
     if ($data['dashboard_date_count'] != '') {
         $resp->set_status(true);
         $resp->set_data(array('dashboard_dates' => $dash->get_dashboard_data((int) $data['dashboard_date_count'])));
     }
     echo $resp->encode_response();
     die;
 }
开发者ID:TrevorMW,项目名称:wp-lrsgen,代码行数:12,代码来源:class-dashboard.php

示例7: createDashboardByNameForOwner

 public static function createDashboardByNameForOwner($name, $owner)
 {
     $dashboard = new Dashboard();
     $dashboard->name = $name;
     $dashboard->layoutId = Dashboard::getNextLayoutId();
     $dashboard->owner = $owner;
     $dashboard->layoutType = '50,50';
     // Not Coding Standard
     $dashboard->isDefault = false;
     $saved = $dashboard->save();
     assert('$saved');
     return $dashboard;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:13,代码来源:DashboardTestHelper.php

示例8: poll

 public static function poll($polls)
 {
     $polls = json_decode($polls);
     $_results = array();
     if (is_array($polls) && count($polls) > 0) {
         foreach ($polls as $i => $_poll) {
             switch ($_poll->type) {
                 case "template":
                     $_results[$_poll->id] = array('type' => 'html', 'args' => Theme::make($_poll->func, array('value' => $_poll->value))->render());
                     break;
                 case "plugin":
                     if ($_poll->func) {
                         $_results[$_poll->id] = call_user_func($_poll->func, $_poll->value);
                     }
                     break;
                 case "check_logs":
                     $list = Dashboard::activity();
                     Session::put('usersonline_lastcheck', time());
                     $_results[$_poll->id] = array('type' => 'function', 'func' => 'fnUpdateGrowler', 'args' => $list);
                     break;
             }
         }
     }
     return $_results;
 }
开发者ID:Aranjedeath,项目名称:Laravel_Starter,代码行数:25,代码来源:Dashboard.php

示例9: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     $account = AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
     ContactTestHelper::createContactWithAccountByNameForOwner('superContact', $super, $account);
     ContactTestHelper::createContactWithAccountByNameForOwner('superContact2', $super, $account);
     OpportunityTestHelper::createOpportunityStagesIfDoesNotExist();
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp2', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp3', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp4', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp5', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp6', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp7', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp8', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp9', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp10', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp11', $super, $account);
     OpportunityTestHelper::createOpportunityWithAccountByNameForOwner('superOpp12', $super, $account);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:27,代码来源:OpportunitiesSuperUserWalkthroughTest.php

示例10: __construct

 public function __construct()
 {
     // use \Podlove\Podcast_Post_Type::SETTINGS_PAGE_HANDLE to replace
     // default first item name
     Dashboard::$pagehook = add_submenu_page(\Podlove\Podcast_Post_Type::SETTINGS_PAGE_HANDLE, __('Dashboard', 'podlove'), __('Dashboard', 'podlove'), 'podlove_read_dashboard', \Podlove\Podcast_Post_Type::SETTINGS_PAGE_HANDLE, array(__CLASS__, 'page'));
     $this->init_page_documentation(self::$pagehook);
     add_action('load-' . Dashboard::$pagehook, function () {
         // Adding the meta boxes here, so they can be filtered by the user settings.
         add_action('add_meta_boxes_' . Dashboard::$pagehook, function () {
             add_meta_box(Dashboard::$pagehook . '_about', __('About', 'podlove'), '\\Podlove\\Settings\\Dashboard\\About::content', Dashboard::$pagehook, 'side');
             add_meta_box(Dashboard::$pagehook . '_statistics', __('At a glance', 'podlove'), '\\Podlove\\Settings\\Dashboard\\Statistics::content', Dashboard::$pagehook, 'normal');
             add_meta_box(Dashboard::$pagehook . '_news', __('Podlove News', 'podlove'), '\\Podlove\\Settings\\Dashboard\\News::content', Dashboard::$pagehook, 'normal');
             do_action('podlove_dashboard_meta_boxes');
             if (current_user_can('administrator')) {
                 add_meta_box(Dashboard::$pagehook . '_validation', __('Validate Podcast Files', 'podlove'), '\\Podlove\\Settings\\Dashboard\\FileValidation::content', Dashboard::$pagehook, 'normal');
             }
         });
         do_action('add_meta_boxes_' . Dashboard::$pagehook);
         wp_enqueue_script('postbox');
         wp_register_script('cornify-js', \Podlove\PLUGIN_URL . '/js/admin/cornify.js');
         wp_enqueue_script('cornify-js');
     });
     add_action('publish_podcast', function () {
         delete_transient('podlove_dashboard_stats');
     });
 }
开发者ID:johannes-mueller,项目名称:podlove-publisher,代码行数:26,代码来源:dashboard.php

示例11: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     //Setup test data owned by the super user.
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, Yii::app()->user->userModel);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:7,代码来源:HomeRegularUserWalkthroughTest.php

示例12: before

 public function before()
 {
     parent::before();
     //Visits
     $visited = \Cookie::get('visited', false);
     if (!$visited) {
         \Dashboard::log_visitor();
         \Cookie::set("visited", true, time() + 86400);
     }
     // Cart
     \Config::load('cart', true);
     $cartManager = new \Cart\Manager(\Config::get('cart'));
     \CartManager::init($cartManager);
     \CartManager::context('Cart');
     // Set Visitors group default
     \Product\Model_Attribute::set_user_group(3);
     \Theme::instance()->active('frontend');
     \Theme::instance()->set_template($this->template);
     // Set a global variable so views can use it
     $seo = array('meta_title' => '', 'meta_description' => '', 'meta_keywords' => '', 'canonical_links' => '', 'meta_robots_index' => 1, 'meta_robots_follow' => 1);
     \View::set_global('seo', $seo, false);
     \View::set_global('theme', \Theme::instance(), false);
     \View::set_global('logged', $this->check_logged(), false);
     \View::set_global('guest', $this->check_guest(), false);
     \View::set_global('logged_type', $this->check_logged_type(), false);
 }
开发者ID:EdgeCommerce,项目名称:edgecommerce,代码行数:26,代码来源:public.php

示例13: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     SecurityTestHelper::createSuperAdmin();
     $super = User::getByUsername('super');
     Yii::app()->user->userModel = $super;
     //Setup test data owned by the super user.
     AccountTestHelper::createAccountByNameForOwner('superAccount', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount2', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount3', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount4', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount5', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount6', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount7', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount8', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount9', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount10', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount11', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount12', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount13', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount14', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount15', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount16', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount17', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount18', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount19', $super);
     AccountTestHelper::createAccountByNameForOwner('superAccount20', $super);
     //Setup default dashboard.
     Dashboard::getByLayoutIdAndUser(Dashboard::DEFAULT_USER_LAYOUT_ID, $super);
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:30,代码来源:AccountsSuperUserWalkthroughTest.php

示例14: resolveMaximumColumnsByDashboardId

 /**
  * Resolve maximum columns by dashboard id
  * @return int
  */
 private function resolveMaximumColumnsByDashboardId()
 {
     $dashBoard = Dashboard::getById(intval($_GET['dashboardId']));
     $layoutTypes = Dashboard::getLayoutTypesData();
     $dashBoardType = $layoutTypes[$dashBoard->layoutType];
     $maximumColumns = substr($dashBoardType, 0, 1);
     return $maximumColumns;
 }
开发者ID:maruthisivaprasad,项目名称:zurmo,代码行数:12,代码来源:DefaultPortletController.php

示例15: cmp

 function cmp($a, $b)
 {
     $a = Dashboard::accessByClassName($a);
     $b = Dashboard::accessByClassName($b);
     $aTime = strtotime($a['item']['updated']);
     $bTime = strtotime($b['item']['updated']);
     return $bTime - $aTime;
 }
开发者ID:uuking,项目名称:wildflower,代码行数:8,代码来源:dashboard.php


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