Jarves\Admin\FieldTypes\ColumnDefinitionInterface::getSqlDataType PHP Method

getSqlDataType() public method

public getSqlDataType ( ) : string
return string
    public function getSqlDataType();

Usage Example

Example #1
0
 protected function setupColumnAttributes(ColumnDefinitionInterface $column, $xmlColumn)
 {
     $xmlColumn['name'] = Tools::camelcase2Underscore($column->getName());
     $type = $column->getSqlDataType();
     $size = null;
     if (false !== ($pos = strpos($type, '('))) {
         $size = trim(str_replace(['(', ')'], '', substr($type, $pos)));
         $type = substr($type, 0, $pos);
     }
     $propelType = $this->getPropelColumnType($type);
     $xmlColumn['type'] = strtoupper($propelType);
     if ($size) {
         $xmlColumn['size'] = $size;
     }
 }