[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/modules/Vtiger/dashboards/ -> MiniList.php (source)

   1  <?php
   2  /*+***********************************************************************************
   3   * The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9   *************************************************************************************/
  10  
  11  class Vtiger_MiniList_Dashboard extends Vtiger_IndexAjax_View {
  12  
  13  	public function process(Vtiger_Request $request, $widget=NULL) {
  14          $currentUser = Users_Record_Model::getCurrentUserModel();
  15          $viewer = $this->getViewer($request);
  16          $moduleName = $request->getModule();
  17  
  18          // Initialize Widget to the right-state of information
  19          if ($widget && !$request->has('widgetid')) {
  20              $widgetId = $widget->get('id');
  21          } else {
  22              $widgetId = $request->get('widgetid');
  23          }
  24  
  25          $widget = Vtiger_Widget_Model::getInstanceWithWidgetId($widgetId, $currentUser->getId());
  26  
  27          $minilistWidgetModel = new Vtiger_MiniList_Model();
  28          $minilistWidgetModel->setWidgetModel($widget);
  29  
  30          $viewer->assign('WIDGET', $widget);
  31          $viewer->assign('MODULE_NAME', $moduleName);
  32          $viewer->assign('MINILIST_WIDGET_MODEL', $minilistWidgetModel);
  33          $viewer->assign('BASE_MODULE', $minilistWidgetModel->getTargetModule());
  34  
  35          $content = $request->get('content');
  36          if(!empty($content)) {
  37              $viewer->view('dashboards/MiniListContents.tpl', $moduleName);
  38          } else {
  39              $widget->set('title', $minilistWidgetModel->getTitle());
  40  
  41              $viewer->view('dashboards/MiniList.tpl', $moduleName);
  42          }
  43  
  44      }
  45  }


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1