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
addStatusToggle return type auf yform4 angepasst #132
Conversation
…m_list sein, siehe yform/manager plugin)
6800b08
to
6c51209
Compare
Es ist eigentlich immer eine rex_yform_list würde ich behaupten. |
@tyrant88 Stimmt, danke, laut Code müsste es eigentlich immer rex_yform_list sein, außer es gibt noch ein anderes addon, das den EP 'YFORM_DATA_LIST' triggert, aber das glaube ich nicht. |
Ich glaube das widerspräche dem Konzept der Extension Points. |
Ah, sehe gerade im yform changelog für Version 4: |
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.
kannst/willst du das noch schnell auf rex_yform_list ändern?
Typsicherheit ist ja ansich nicht schlecht und in PHP 8 sind Union Types erlaubt. Ich schlage daher vor, beide Typen zuzulassen und den PR in "addStatusToggle return type rex_yform_list zulassen" umzubenennen: protected static function addStatusToggle($list, $table): \rex_list | \rex_yform_list
{
/** @var \rex_list | \rex_yform_list $list */
// ...
} |
@goldfoot ? Eventuell merge ich den PR so wie er ist, wenn der Ersteller ihn nicht zeitnah anpasst, deshalb bleibt der Titel erstmal. :-) |
@tyrant88 Stimmt, ich hatte die Beschränkung der yForm Version nicht berücksichtigt und bin daher davon ausgegangen, dass auch yForm 3 noch möglich sei. |
Rückgabe kann auch rex_yform_list sein, nicht nur rex_list.
Siehe Code Stellen:
https://github.com/yakamara/redaxo_yform/blob/ced8f147a76caae745281fa112b3f1a17a807efd/plugins/manager/fragments/yform/manager/page/list.php#L16
https://github.com/yakamara/redaxo_yform/blob/ced8f147a76caae745281fa112b3f1a17a807efd/plugins/manager/fragments/yform/manager/page/list.php#L175
https://github.com/FriendsOfREDAXO/yform_usability/blob/main/boot.php#L65