/**
* Build the schema for Bolt ContentType tables.
*
* @param Schema $schema
* @param Config $config
*
* @return \Doctrine\DBAL\Schema\Table[]
*/
public function getSchemaTables(Schema $schema, Config $config)
{
/** @var $fieldManager FieldManager */
$fieldManager = $config->getFields();
$contentTypes = $config->get('contenttypes');
$tables = [];
foreach ($this->tables->keys() as $name) {
$contentType = $contentTypes[$name];
$tables[$name] = $this->tables[$name]->buildTable($schema, $this->prefix . $name, $name);
if (isset($contentType['fields']) && is_array($contentType['fields'])) {
$this->addContentTypeTableColumns($this->tables[$name], $tables[$name], $contentType['fields'], $fieldManager);
}
}
return $tables;
}