[FEATURE] Add option to add empty select option in tca utility

This commit is contained in:
Philipp Dieter 2021-11-23 00:00:06 +01:00
parent cf387b1af7
commit 7edad9ec5e

View File

@ -50,9 +50,17 @@ class TcaUtility
* @return void
*/
public static function configureSelectFromArray(
&$tca, $column, $element, $options, $extensionKey = null
&$tca,
$column,
$element,
$options,
$extensionKey = null,
$addEmpty = false
) {
$items = [];
if ($addEmpty) {
$items[] = ['-', ''];
}
foreach ($options as $option) {
$translationKey = "option.$element.$column.$option";
$translation = self::getTranslation(