[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
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function configureSelectFromArray(
|
public static function configureSelectFromArray(
|
||||||
&$tca, $column, $element, $options, $extensionKey = null
|
&$tca,
|
||||||
|
$column,
|
||||||
|
$element,
|
||||||
|
$options,
|
||||||
|
$extensionKey = null,
|
||||||
|
$addEmpty = false
|
||||||
) {
|
) {
|
||||||
$items = [];
|
$items = [];
|
||||||
|
if ($addEmpty) {
|
||||||
|
$items[] = ['-', ''];
|
||||||
|
}
|
||||||
foreach ($options as $option) {
|
foreach ($options as $option) {
|
||||||
$translationKey = "option.$element.$column.$option";
|
$translationKey = "option.$element.$column.$option";
|
||||||
$translation = self::getTranslation(
|
$translation = self::getTranslation(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user