-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ready for Contao 5 #19
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Habe mal ein wenig durchgeschaut. Wenn wir schon ne neue Major machen, sollten wir nicht stumpf einfach nur kompatibel machen, dann brauchen wir keine Major. Sehe ehrlich gesagt nicht wirklich breaking changes.
Falls wir doch ne neue Major machen wollen, sollten wir auch ein paar Dinge anpacken:
- Deprecations entfernen, bitte mal den Code danach durchsuchen.
- Den DC_Multilingual-Kram vielleicht in eine EventListener-Klasse kapseln und damit aus dem restlichen Code rausnehmen.
- Siehe andere Kommentare :)
List-Bundle ist leider ne größere Baustelle..mal wieder :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die Klasse ist ja deprecated, könnte also einfach raus ;)
System::getContainer()->get('huh.utils.image')->addToTemplateData($imageField, $imageSelectorField, | ||
$templateData[$templateContainer][$templateVariable], $imageArray, null, null, | ||
null, $imageFile); | ||
Polyfill::addImageToTemplateData( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ähm...bitte doch gleich auf aktuell Contao-Services umstellen
|
||
System::getContainer()->get('huh.filter.session')->setData($sessionKey, $sessionData); | ||
$jumpTo = $configElement->tagsJumpTo; | ||
if ($jumpTo && $jumpTo != $GLOBALS['objPage']?->id || $jumpTo = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicht mit $GLOBALS['objPage'] arbeiten, wenn dann mit Utils->request->getCurrentPage()
* | ||
* @return Model|null | ||
*/ | ||
$filterConfigElement = function () use ($configElement, &$filterConfigElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das ist leider wirklich unnötig. Einfach im if FilterConfigElementModel::findByPk()
nutzen, gleicher effekt, weniger unnötiger code ;)
$videoData['size'] = sprintf(' width="%s" height="%s" ', $size->width, $size->height); | ||
} | ||
|
||
$itemData = $item->getRaw(); | ||
$itemData['size'] = $listConfigElement->videoSize; | ||
|
||
if ($listConfigElement->posterImageField && $item->getRawValue($listConfigElement->posterImageField)) { | ||
$this->imageUtil->addToTemplateData($listConfigElement->posterImageField, '', $videoData['posterImg'], $itemData); | ||
Polyfill::addImageToTemplateData($listConfigElement->posterImageField, '', $videoData['posterImg'], $itemData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auch hier bitte wieder Contao Bordmittel verwenden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Könnte man in dem Zuge zu "HeimrichHannotListBundle" umbenennen
|
||
public function __construct(Utils $utils) | ||
{ | ||
if (!($_ENV['UPGRADE_LIST_ALLOW_DC_MULTILINGUAL'] ?? false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What?
src/Lists/ListInterface.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ehrlich gesagt sollten wir das List-Interface raus kicken oder durch was sinnvolles bzw. ne abstrakte Klasse ersetzen. So ist das Interface völliger Irrsinn.
@@ -736,7 +737,7 @@ | |||
|
|||
$dca['fields']['numberOfItems']['eval']['tl_class'] = 'w50 clr'; | |||
|
|||
if (System::getContainer()->get('huh.utils.container')->isBundleActive('modal')) { | |||
if (in_array('modal', array_keys(System::getContainer()->getParameter('kernel.bundles')))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Das kann raus, das alte Modal-Modul müssen wir nicht mehr utnerstützen.
@@ -759,7 +760,9 @@ | |||
$dca['subpalettes']['addDetails'] = 'useModalExplanation,useModal,'.$dca['subpalettes']['addDetails']; | |||
} | |||
|
|||
if (System::getContainer()->get('huh.utils.container')->isBundleActive('Terminal42\DcMultilingualBundle\Terminal42DcMultilingualBundle')) { | |||
if (in_array('Terminal42\DcMultilingualBundle\Terminal42DcMultilingualBundle', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Können wir nicht das ganze DC_Multilingual-Zeug in einen Event-Listener packen, damit es nicht so verteilt ist?
No description provided.