[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/pkg/vtiger/modules/PBXManager/settings/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 Settings_PBXManager_Module_Model extends Settings_Vtiger_Module_Model{
  12      
  13      /**

  14       * Function to get the module model

  15       * @return string

  16       */
  17      public static function getCleanInstance(){
  18          return new self;
  19      }
  20      
  21      /**

  22       * Function to get the ListView Component Name

  23       * @return string

  24       */
  25      public function getDefaultViewName() {
  26          return 'Index';
  27      }
  28      
  29      /**

  30       * Function to get the EditView Component Name

  31       * @return string

  32       */
  33  	public function getEditViewName(){
  34          return 'Edit';
  35      }
  36      
  37      /**

  38       * Function to get the Module Name

  39       * @return string

  40       */
  41      public function getModuleName(){
  42          return "PBXManager";
  43      }
  44      
  45       public function getParentName() {
  46          return parent::getParentName();
  47      }
  48      
  49      public function getModule($raw=true) {
  50          $moduleName = Settings_PBXManager_Module_Model::getModuleName();
  51          if(!$raw) {
  52              $parentModule = Settings_PBXManager_Module_Model::getParentName();
  53              if(!empty($parentModule)) {
  54                  $moduleName = $parentModule.':'.$moduleName;
  55              }
  56          }
  57          return $moduleName;
  58      }
  59      
  60      public function getMenuItem() {
  61          $menuItem = Settings_Vtiger_MenuItem_Model::getInstance('LBL_PBXMANAGER');
  62          return $menuItem;
  63      }
  64      
  65      /**

  66      * Function to get the url for default view of the module

  67      * @return <string> - url

  68      */
  69      public function getDefaultUrl() {
  70              return 'index.php?module='.$this->getModuleName().'&parent=Settings&view='.$this->getDefaultViewName();
  71      }
  72  
  73      public function getDetailViewUrl() {
  74          $menuItem = $this->getMenuItem();
  75          return 'index.php?module='.$this->getModuleName().'&parent=Settings&view='.$this->getDefaultViewName().'&block='.$menuItem->get('blockid').'&fieldid='.$menuItem->get('fieldid');
  76      }
  77  
  78  
  79     /**

  80      * Function to get the url for Edit view of the module

  81      * @return <string> - url

  82      */
  83      public function getEditViewUrl() {
  84              $menuItem = $this->getMenuItem();
  85              return 'index.php?module='.$this->getModuleName().'&parent=Settings&view='.$this->getEditViewName().'&block='.$menuItem->get('blockid').'&fieldid='.$menuItem->get('fieldid');
  86      }
  87      
  88  }


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