heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

dca()->getDcaFields() move constructor call to method body #81

Closed ericges closed 7 months ago

ericges commented 8 months ago

This eases passing as a parameter from within a nested context.

e.g.

    public static function getFieldOptions(DataContainer $dc, ?GetDcaFieldsOptions $options = null)
    {
        System::getContainer()->get(Utils::class)->dca()->getDcaFields($dc->table, $options);
    }

This way we don't override the default options cunstructor.

Just a QoL improvement. Does not break backward compatibility.