public function getExport($exportId, $dispatchException = false)
    {
        $export = (new ExportQuery)->findPk($exportId);

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

        return $export;
    }
public function getExport($exportId, $dispatchException = false)
    {
        $export = (new ExportQuery)->findPk($exportId);

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

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

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

@throws \ErrorException

@return null|\Thelia\Model\Export
Get export model based on given identifier