示例#1
0
 /**
  * called by tl_metamodel.tableName onsave_callback.
  * prefixes the table name with mm_ if not provided by the user as such.
  * Checks if the table name is legal to the DB.
  *
  * @param string        $strTableName the table name for the table.
  * @param DataContainer $objDC        the DataContainer which called us.
  *
  * @return string the table name $strTableName.
  */
 public function tableNameOnSaveCallback($strTableName, DC_General $objDC)
 {
     // See #49
     $strTableName = strtolower($strTableName);
     // force mm_ prefix.
     if (substr($strTableName, 0, 3) !== 'mm_') {
         $strTableName = 'mm_' . $strTableName;
     }
     MetaModelTableManipulation::checkTablename($strTableName);
     return $strTableName;
 }