[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/pkg/vtiger/modules/Projects/ProjectMilestone/models/ -> Module.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 ProjectMilestone_Module_Model extends Vtiger_Module_Model {
  12  
  13  	public function getSideBarLinks($linkParams) {
  14          $linkTypes = array('SIDEBARLINK', 'SIDEBARWIDGET');
  15          $links = parent::getSideBarLinks($linkParams);
  16          unset($links['SIDEBARLINK']);
  17  
  18          $quickLinks = array(
  19              array(
  20                  'linktype' => 'SIDEBARLINK',
  21                  'linklabel' => 'LBL_PROJECTS_LIST',
  22                  'linkurl' => $this->getProjectsListUrl(),
  23                  'linkicon' => '',
  24              ),
  25              array(
  26                  'linktype' => 'SIDEBARLINK',
  27                  'linklabel' => 'LBL_TASKS_LIST',
  28                  'linkurl' => $this->getTasksListUrl(),
  29                  'linkicon' => '',
  30              ),
  31              array(
  32                  'linktype' => 'SIDEBARLINK',
  33                  'linklabel' => 'LBL_MILESTONES_LIST',
  34                  'linkurl' => $this->getListViewUrl(),
  35                  'linkicon' => '',
  36              ),
  37          );
  38          foreach($quickLinks as $quickLink) {
  39              $links['SIDEBARLINK'][] = Vtiger_Link_Model::getInstanceFromValues($quickLink);
  40          }
  41  
  42          return $links;
  43      }
  44  
  45  	public function getProjectsListUrl() {
  46          $taskModel = Vtiger_Module_Model::getInstance('Project');
  47          return $taskModel->getListViewUrl();
  48      }
  49      
  50      public function getTasksListUrl() {
  51          $taskModel = Vtiger_Module_Model::getInstance('ProjectTask');
  52          return $taskModel->getListViewUrl();
  53      }
  54  }
  55  ?>


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