private function getFirstTypeIfOnlyOneIsInUse()
{
$types = $this->typeManager->getAllTypes();
if (count($types) === 1) {
// only one type is in use, use this one for the wording
return reset($types);
} else {
// multiple types are activated, check whether only one is actually in use
$model = new Model();
$typeIds = $model->getUsedTypeIds();
if (count($typeIds) === 1) {
$typeManager = new TypeManager();
return $typeManager->getType(reset($typeIds));
}
}
}