return $type->
getInternalName();
},
$types);
if (!
empty($types)) { $names =
$this->connection->
executeQuery('SELECT internalName FROM s_content_types WHERE source IS NOT NULL AND internalName NOT IN(:names)',
[ 'names' =>
$types,
],
[ 'names' => Connection::PARAM_STR_ARRAY,
])->
fetchAll(PDO::FETCH_COLUMN
);
foreach ($names as $name) { $this->cleanupService->
deleteContentType($name);
} $this->connection->
executeQuery('DELETE FROM s_content_types WHERE source IS NOT NULL AND internalName NOT IN(:names)',
[ 'names' =>
$types,
],
[ 'names' => Connection::PARAM_STR_ARRAY,
]);
} else { $this->connection->
executeQuery('DELETE FROM s_content_types WHERE source IS NOT NULL'
);
} }