[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/modules/Vtiger/models/ -> Utility.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  /**
  12   * Vtiger Action Model Class
  13   */
  14  class Vtiger_Utility_Model extends Vtiger_Action_Model {
  15  
  16  	public function isUtilityTool() {
  17          return true;
  18      }
  19  
  20  	public function isModuleEnabled($module) {
  21          $db = PearDatabase::getInstance();
  22          if(!$module->isEntityModule()) {
  23              if(!$module->isUtilityActionEnabled())
  24                  return false;
  25          }
  26          $tabId = $module->getId();
  27          $sql = 'SELECT 1 FROM vtiger_profile2utility WHERE tabid = ? AND activityid = ? LIMIT 1';
  28          $params = array($tabId, $this->getId());
  29          $result = $db->pquery($sql, $params);
  30          if($result && $db->num_rows($result) > 0) {
  31              return true;
  32          }
  33          return false;
  34      }
  35  
  36  }


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