createColumn() public static méthode

Throws Exception if the table does not exist, the column name is invalid or the column already exists.
public static createColumn ( string $strTableName, string $strColumnName, string $strType, boolean $blnAllowSystemCol = false ) : void
$strTableName string The name of the table to add the column to.
$strColumnName string The name of the new column.
$strType string The SQL type notation of the new column.
$blnAllowSystemCol boolean If this is set to true, no system column name checking will be applied.
Résultat void
Exemple #1
0
 /**
  * Creates the underlying database structure for this field.
  *
  * You have to override this function in field types, when you want to have multi column structure etc.
  *
  * @return void
  */
 public function createColumn()
 {
     if ($this->getColName()) {
         TableManipulation::createColumn($this->getMetaModel()->getTableName(), $this->getColName(), $this->getSQLDataType());
     }
 }