private function validateContentTypes(Bag $importData)
    {
        $contentTypeNames = $this->contentTypes->keys()->toArray();
        $importData->filter(function ($k, $v) use ($contentTypeNames) {
            if (!in_array($k, $contentTypeNames)) {
                throw new RuntimeException(sprintf('ContentType "%s" is not configured.', $k));
            }
        });
    }
private function validateContentTypes(Bag $importData)
    {
        $contentTypeNames = $this->contentTypes->keys()->toArray();
        $importData->filter(function ($k, $v) use ($contentTypeNames) {
            if (!in_array($k, $contentTypeNames)) {
                throw new RuntimeException(sprintf('ContentType "%s" is not configured.', $k));
            }
        });
    }
private function validateContentTypes ( Bag $ importData ) { $ contentTypeNames = $ this -> contentTypes -> keys ( ) -> toArray ( ) ; $ importData -> filter ( function ( $ k , $ v ) use ( $ contentTypeNames ) { if ( ! in_array ( $ k , $ contentTypeNames ) ) { throw new RuntimeException ( sprintf ( 'ContentType "%s" is not configured.' , $ k ) ) ; } } ) ; }
Check that the import file's ContentTypes exists.

@param Bag $importData

@throws RuntimeException
Check that the import file s ContentTypes exists .