Bolt\Legacy\Storage::runContentTypeTableChecks PHP Method

runContentTypeTableChecks() private method

Check for the existence of ContentType tables.
private runContentTypeTableChecks ( array $contenttypes ) : boolean
$contenttypes array ContentType slugs to check
return boolean
    private function runContentTypeTableChecks(array $contenttypes)
    {
        $checkedcontenttype = [];
        foreach ($contenttypes as $contenttypeslug) {
            // Make sure we do this only once per contenttype
            if (isset($checkedcontenttype[$contenttypeslug])) {
                continue;
            }
            $checkedcontenttype[$contenttypeslug] = true;
            // If the table doesn't exist (yet), return false.
            $contenttype = $this->getContentType($contenttypeslug);
            $tablename = $this->getContenttypeTablename($contenttype);
            if (!$this->tableExists($tablename)) {
                return false;
            }
        }
        return true;
    }