Bolt\Storage\Migration\Import::checkContentTypesValid PHP Method

checkContentTypesValid() private method

Check that the ContentType specified in the record data is valid.
private checkContentTypesValid ( string $filename, string $contenttypeslug ) : boolean
$filename string
$contenttypeslug string
return boolean
    private function checkContentTypesValid($filename, $contenttypeslug)
    {
        if (isset($this->contenttypes[$contenttypeslug])) {
            return true;
        }
        $contenttype = $this->app['storage']->getContentType($contenttypeslug);
        if (empty($contenttype)) {
            $this->setError(true)->setErrorMessage("File '{$filename}' has and invalid ContentType '{$contenttypeslug}'! Skipping file.");
            return false;
        }
        $this->contenttypes[$contenttypeslug] = $contenttype;
        return true;
    }