src/Shell/ImportShell.php
protected function _newImport(ImportsTable $table, Import $import, int $count) : bool
    {
        $data = [
            'status' => $table::STATUS_IN_PROGRESS,
            'attempts' => 1,
            'attempted_date' => Time::now()
        ];

        $import = $table->patchEntity($import, $data);
        $table->save($import);

        $this->_run($import, $count);

        // mark import as completed
        $data = [
            'status' => $table::STATUS_COMPLETED
        ];

        $import = $table->patchEntity($import, $data);

        return (bool)$table->save($import);
    }
protected function _newImport(ImportsTable $table, Import $import, int $count) : bool
    {
        $data = [
            'status' => $table::STATUS_IN_PROGRESS,
            'attempts' => 1,
            'attempted_date' => Time::now()
        ];

        $import = $table->patchEntity($import, $data);
        $table->save($import);

        $this->_run($import, $count);

        // mark import as completed
        $data = [
            'status' => $table::STATUS_COMPLETED
        ];

        $import = $table->patchEntity($import, $data);

        return (bool)$table->save($import);
    }
protected function _newImport ( ImportsTable $ table , Import $ import , int $ count ) : bool { $ data = [ 'status' => $ table :: STATUS_IN_PROGRESS , 'attempts' => 1 , 'attempted_date' => Time :: now ( ) ] ; $ import = $ table -> patchEntity ( $ import , $ data ) ; $ table -> save ( $ import ) ; $ this -> _run ( $ import , $ count ) ; // mark import as completed $ data = [ 'status' => $ table :: STATUS_COMPLETED ] ; $ import = $ table -> patchEntity ( $ import , $ data ) ; return ( bool ) $ table -> save ( $ import ) ; }
New import.

@param \CsvMigrations\Model\Table\ImportsTable $table Import table instance
@param \CsvMigrations\Model\Entity\Import $import Import entity
@param int $count Progress count
@return bool
New import .