src/Shell/ImportShell.php
protected function _importSuccess(ImportResult $importResult, EntityInterface $entity) : bool
    {
        $table = TableRegistry::get('CsvMigrations.ImportResults');
        Assert::isInstanceOf($table, ImportResultsTable::class);

        $importResult->set('model_id', $entity->get('id'));
        $importResult->set('status', $table::STATUS_SUCCESS);
        $importResult->set('status_message', $table::STATUS_SUCCESS_MESSAGE);

        return (bool)$table->save($importResult);
    }
protected function _importSuccess(ImportResult $importResult, EntityInterface $entity) : bool
    {
        $table = TableRegistry::get('CsvMigrations.ImportResults');
        Assert::isInstanceOf($table, ImportResultsTable::class);

        $importResult->set('model_id', $entity->get('id'));
        $importResult->set('status', $table::STATUS_SUCCESS);
        $importResult->set('status_message', $table::STATUS_SUCCESS_MESSAGE);

        return (bool)$table->save($importResult);
    }
protected function _importSuccess ( ImportResult $ importResult , EntityInterface $ entity ) : bool { $ table = TableRegistry :: get ( 'CsvMigrations.ImportResults' ) ; Assert :: isInstanceOf ( $ table , ImportResultsTable :: class ) ; $ importResult -> set ( 'model_id' , $ entity -> get ( 'id' ) ) ; $ importResult -> set ( 'status' , $ table :: STATUS_SUCCESS ) ; $ importResult -> set ( 'status_message' , $ table :: STATUS_SUCCESS_MESSAGE ) ; return ( bool ) $ table -> save ( $ importResult ) ; }
Mark import result as successful.

@param \CsvMigrations\Model\Entity\ImportResult $importResult ImportResult entity
@param \Cake\Datasource\EntityInterface $entity Newly created Entity
@return bool
Mark import result as successful .