/** * @return ColumnDefinitionInterface[] */ public function getColumns() { $columnDefinition = new ColumnDefinition(); $columnDefinition->setPhpDataType($this->getPhpDataType()); $type = $this->getSqlDataType(); if ($maxLength = $this->getFieldDefinition()->getMaxLength()) { $type .= '(' . $maxLength . ')'; } $columnDefinition->setSqlDataType($type); $columnDefinition->setName($this->getFieldDefinition()->getId()); if ($regex = $this->getFieldDefinition()->getRequiredRegex()) { $columnDefinition->setRequiredRegex($regex); } return [$columnDefinition]; }