public function getImport($importId, $dispatchException = false)
    {
        $import = (new ImportQuery)->findPk($importId);

        if ($import === null && $dispatchException) {
            throw new \ErrorException(
                Translator::getInstance()->trans(
                    'There is no id "%id" in the imports',
                    [
                        '%id' => $importId
                    ]
                )
            );
        }

        return $import;
    }
public function getImport($importId, $dispatchException = false)
    {
        $import = (new ImportQuery)->findPk($importId);

        if ($import === null && $dispatchException) {
            throw new \ErrorException(
                Translator::getInstance()->trans(
                    'There is no id "%id" in the imports',
                    [
                        '%id' => $importId
                    ]
                )
            );
        }

        return $import;
    }
public function getImport ( $ importId , $ dispatchException = false ) { $ import = ( new ImportQuery ) -> findPk ( $ importId ) ; if ( $ import === null && $ dispatchException ) { throw new \ ErrorException ( Translator :: getInstance ( ) -> trans ( 'There is no id "%id" in the imports' , [ '%id' => $ importId ] ) ) ; } return $ import ; }
Get import model based on given identifier

@param integer $importId          An import identifier
@param boolean $dispatchException Dispatch exception if model doesn't exist

@throws \ErrorException

@return null|\Thelia\Model\Import
Get import model based on given identifier