codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

Support boolean sql config when formatting DCA values #170

Closed rabauss closed 2 years ago

rabauss commented 2 years ago

If you define boolean fields with correct sql in the dca ('sql' => ['type' => 'boolean', 'default' => false]) at the moment the output when formatting the value will be yes if the value is false (in the database 0 and not '')

rabauss commented 2 years ago

Yes, I was not sure how strict we want to be :-) Could be also:

return !empty($varValue) ? $GLOBALS['TL_LANG']['MSC']['yes'] : $GLOBALS['TL_LANG']['MSC']['no'];
qzminski commented 2 years ago

Tagged as 4.25.19, thanks @rabauss !