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

add utility classes for dca sorting modes and flags #124

Closed Tastaturberuf closed 6 years ago

Tastaturberuf commented 6 years ago

add readable sorting modes and flags for using in the dca files

qzminski commented 6 years ago

That's a good idea but I think this should rather be a Contao core code. @Toflar @aschempp

Tastaturberuf commented 6 years ago

I think the same but i want to have it asap and in older contao versions like 3.5 LTS and 4.4 LTS. That's why this is also a 'haste' feature.

aschempp commented 6 years ago

I like the idea and I'm fine with adding it to Haste. But I think the constant names should be shorter and the classes should be in Haste\Dca namespace.

qzminski commented 6 years ago

I agree with moving it to the Dca namespace. Also, the names could be shortened a bit:

NOT_SORTED => NONE
SORTED_FIXED_FIELD => FIXED_FIELD
SORTED_SWITCHABLE_FIELD => SWITCHABLE_FIELD
SORTED_PARENT_TABLE => PARENT_TABLE
DISPLAY_AS_CHILD => CHILD_VIEW
DISPLAY_AS_TREE => TREE_VIEW
DISPLAY_AS_CHILD_TREE => CHILD_TREE_VIEW
Tastaturberuf commented 6 years ago

Thanks for the feedback. I update the PR

qzminski commented 6 years ago

Thanks @Tastaturberuf !

qzminski commented 6 years ago

I have just released 4.19.0.