當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SugarBean::getObjectName方法代碼示例

本文整理匯總了PHP中SugarBean::getObjectName方法的典型用法代碼示例。如果您正苦於以下問題:PHP SugarBean::getObjectName方法的具體用法?PHP SugarBean::getObjectName怎麽用?PHP SugarBean::getObjectName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SugarBean的用法示例。


在下文中一共展示了SugarBean::getObjectName方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: repairTable

 /**
  * Implements repair of a db table for a bean.
  *
  * @param  SugarBean $bean    SugarBean instance
  * @param  bool   $execute true if we want the action to take place, false if we just want the sql returned
  * @return string SQL statement or empty string, depending upon $execute
  */
 public function repairTable(SugarBean $bean, $execute = true)
 {
     $indices = $bean->getIndices();
     $fielddefs = $bean->getFieldDefinitions();
     $tablename = $bean->getTableName();
     //Clean the indexes to prevent duplicate definitions
     $new_index = array();
     foreach ($indices as $ind_def) {
         $new_index[$ind_def['name']] = $ind_def;
     }
     //jc: added this for beans that do not actually have a table, namely
     //ForecastOpportunities
     if ($tablename == 'does_not_exist' || $tablename == '') {
         return '';
     }
     global $dictionary;
     $engine = null;
     if (isset($dictionary[$bean->getObjectName()]['engine']) && !empty($dictionary[$bean->getObjectName()]['engine'])) {
         $engine = $dictionary[$bean->getObjectName()]['engine'];
     }
     return $this->repairTableParams($tablename, $fielddefs, $new_index, $execute, $engine);
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:29,代碼來源:DBManager.php

示例2: repairTable

 /**
  * Implements repair of a db table for a bean.
  *
  * @param  object $bean    SugarBean instance
  * @param  bool   $execute true if we want the action to take place, false if we just want the sql returned
  * @return string SQL statement or empty string, depending upon $execute
  */
 public function repairTable(SugarBean $bean, $execute = true)
 {
     $indices = $bean->getIndices();
     $fielddefs = $bean->getFieldDefinitions();
     $tablename = $bean->getTableName();
     //jc: added this for beans that do not actually have a table, namely
     //ForecastOpportunities
     if ($tablename == 'does_not_exist' || $tablename == '') {
         return '';
     }
     global $dictionary;
     $engine = null;
     if (isset($dictionary[$bean->getObjectName()]['engine']) && !empty($dictionary[$bean->getObjectName()]['engine'])) {
         $engine = $dictionary[$bean->getObjectName()]['engine'];
     }
     return $this->repairTableParams($tablename, $fielddefs, $indices, $execute, $engine);
 }
開發者ID:congtt,項目名稱:pj.ntk,代碼行數:24,代碼來源:DBManager.php


注:本文中的SugarBean::getObjectName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。