eZ\Publish\Core\Persistence\Legacy\Content\Type\Gateway\ExceptionConversion::insertFieldDefinition PHP Method

insertFieldDefinition() public method

Inserts a $fieldDefinition for $typeId.
public insertFieldDefinition ( mixed $typeId, integer $status, eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef ) : mixed
$typeId mixed
$status integer
$fieldDefinition eZ\Publish\SPI\Persistence\Content\Type\FieldDefinition
$storageFieldDef eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
return mixed Field definition ID
    public function insertFieldDefinition($typeId, $status, FieldDefinition $fieldDefinition, StorageFieldDefinition $storageFieldDef)
    {
        try {
            return $this->innerGateway->insertFieldDefinition($typeId, $status, $fieldDefinition, $storageFieldDef);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }