[FEATURE] Add option to add empty select option in tca utility
This commit is contained in:
parent
cf387b1af7
commit
7edad9ec5e
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user