private function addContentTypeTableColumn(ContentType $tableObj, Table $table, $fieldName, array $values, FieldManager $fieldManager)
    {
        if ($tableObj->isKnownType($values['type'])) {
            // Use loose comparison on true as 'true' in YAML is a string
            $addIndex = isset($values['index']) && (bool) $values['index'] === true;
            // Add the ContentType's specific fields
            $tableObj->addCustomFields($fieldName, $this->getContentTypeTableColumnType($values), $addIndex);
        } elseif ($handler = $fieldManager->getDatabaseField($values['type'])) {
            $type = ($handler->getStorageType() instanceof Type) ? $handler->getStorageType()->getName() : $handler->getStorageType();
            /** @var $handler \Bolt\Storage\Field\FieldInterface */
            $table->addColumn($fieldName, $type, $handler->getStorageOptions());
        }
    }
private function addContentTypeTableColumn(ContentType $tableObj, Table $table, $fieldName, array $values, FieldManager $fieldManager)
    {
        if ($tableObj->isKnownType($values['type'])) {
            // Use loose comparison on true as 'true' in YAML is a string
            $addIndex = isset($values['index']) && (bool) $values['index'] === true;
            // Add the ContentType's specific fields
            $tableObj->addCustomFields($fieldName, $this->getContentTypeTableColumnType($values), $addIndex);
        } elseif ($handler = $fieldManager->getDatabaseField($values['type'])) {
            $type = ($handler->getStorageType() instanceof Type) ? $handler->getStorageType()->getName() : $handler->getStorageType();
            /** @var $handler \Bolt\Storage\Field\FieldInterface */
            $table->addColumn($fieldName, $type, $handler->getStorageOptions());
        }
    }
private function addContentTypeTableColumn ( ContentType $ tableObj , Table $ table , $ fieldName , array $ values , FieldManager $ fieldManager ) { if ( $ tableObj -> isKnownType ( $ values [ 'type' ] ) ) { // Use loose comparison on true as 'true' in YAML is a string $ addIndex = isset ( $ values [ 'index' ] ) && ( bool ) $ values [ 'index' ] === true ; // Add the ContentType's specific fields $ tableObj -> addCustomFields ( $ fieldName , $ this -> getContentTypeTableColumnType ( $ values ) , $ addIndex ) ; } elseif ( $ handler = $ fieldManager -> getDatabaseField ( $ values [ 'type' ] ) ) { $ type = ( $ handler -> getStorageType ( ) instanceof Type ) ? $ handler -> getStorageType ( ) -> getName ( ) : $ handler -> getStorageType ( ) ; /** @var $handler \Bolt\Storage\Field\FieldInterface */ $ table -> addColumn ( $ fieldName , $ type , $ handler -> getStorageOptions ( ) ) ; } }
Add a single column to the ContentType table.

@param \Bolt\Storage\Database\Schema\Table\ContentType $tableObj
@param \Doctrine\DBAL\Schema\Table                     $table
@param string                                          $fieldName
@param array                                           $values
@param FieldManager                                    $fieldManager
Add a single column to the ContentType table .