Index
-
\com\setasign\Konquadrat
-
Import
-
RowImport
- AbstractRowImport
- AbstractRowImportWithImportRelations
- HasImportRelationsInterface
- ImportRelationFields
- ImportRelationFieldsInterface
- ImportRelations
- ImportRelationsInterface
- ImportRow
- MainImportRow
- MainImportRowFactory
- MainImportRowFactoryInterface
- RowImportHandler
- RowImportHandlerFactory
- RowImportHandlerFactoryInterface
- RowImportHandlerInterface
- RowImportInterface
-
RowImport
-
Import
com\setasign\Konquadrat\Import\RowImport
ImportRelationsInterface Interface ImportRelationsInterface
File: /Konquadrat/src/Import/RowImport/ImportRelationsInterface.php
The import relations have the job to manage related import rows and objects.
Implemented in
Summary
Methods
deleteRows()
Removes the row from related rowIds. Should be triggered when the row is deleted in the preview.
Parameters
- $rowIds : int[]
getObject()
Returns the matching object to the ident.
Parameters
- $ident : string
Exceptions
Throws \BadMethodCallException If the object doesn't exist, no object is defined or the ident is unknown. Should never be thrown after hasObject($ident) === true.
registerAndCompare()
callable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent,
callable $fetchFieldsOfObject
Registers the row to the importRelations. If there is already another row or object for the ident the existing row/object will be compared to the importRow and register an error for the mismatching field (only if there isn't already an error in this field).
Note: you should validate and sanitize the row first because the row will be compared to the sanitized data (if the ident matches to another row).
Parameters
- $importRow : MainImportRow
- $fetchIdentAndFieldsOfRow : callable
function (MainImportRow $importRow): ImportRelationFieldsInterface[]
- $findObjectByIdent : callable
function (string $ident): ?AbstractObject
- $fetchFieldsOfObject : callable
function (AbstractObject $object): string[]
registerAndForbidDuplications()
Registers the row to the importRelations. If there is already another row or object for the ident an error will be registered for all fields in $fields.
Parameters
- $importRow : MainImportRow
- $fetchIdentAndFieldsOfRow : callable
function (MainImportRow $importRow): ImportRelationFieldsInterface
- $findObjectByIdent : callable
function (string $ident): ?AbstractObject
registerObject()
Registers an object to the ident.
Parameters
- $ident : string
- $object : \com\setasign\Konquadrat\Object\AbstractObject
