protected function getTitleColumnName($contentType)
{
$fields = $contentType['fields'];
$names = ['title', 'name', 'caption', 'subject', 'titel', 'naam', 'onderwerp', 'nom', 'sujet', 'nombre', 'sujeto', 'titulo', 'nome', 'subtitulo', 'assunto'];
foreach ($fields as $name => $values) {
if (in_array($name, $names)) {
return $name;
}
}
foreach ($fields as $name => $values) {
if ($values['type'] === 'text') {
return $name;
}
}
// If this is a contenttype without any textfields
$keys = array_keys($fields);
return reset($keys);
}