- Issue created by @Ludo.R
- π§πͺBelgium Ludo.R Brussels
Here's the new plugin.
This plugin should work without any problem with D10/D9.
- Status changed to Needs review
5 months ago 2:03pm 24 January 2024 - π§πͺBelgium Ludo.R Brussels
Code is exactly the same, just fixed some typos in comments.
- Status changed to Needs work
5 months ago 3:25pm 24 January 2024 - πΊπΈUnited States smustgrave
Will need test coverage.
New plugin would need a CRNew functions should be typehinted with returns, even if return is :void
- last update
5 months ago Custom Commands Failed - π§πͺBelgium Ludo.R Brussels
Here's an updated patch with PHPCS fix.
@smustgrave, what new functions are you referring to?
All functions in there are inherited, or documented in interfaces. Also I don't see any example in https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/node/..., which is was my example. - last update
5 months ago Build Successful - πΊπΈUnited States smustgrave
New functions even if inherited can be typehinted with a return. Also recommend using MRs as patches are being phased out and not as supported
- π§πͺBelgium Ludo.R Brussels
Here's the patch with test coverage, this is now against Drupal 11.x, functions are typehinted.
Will create a MR.
- last update
5 months ago Custom Commands Failed - π³π±Netherlands Lendude Amsterdam
The "Views Default Argument: Entity Field Values" module already provides this functionality and much much more, see https://www.drupal.org/project/views_arg_entity_field β
I don't think we should be adding something so Node specific to core. The problem with these default arguments is that they are not filtered and all of them always show up on all fields even when totally inappropriate (filtering a date field by current node type when viewing a taxonomy term anyone?), so I'd prefer the list we have by default in core to stay as small as possible. Yes default arguments are great tools but having a generic solution like the module provides is, I think, a better way forward than adding individual fields to core.
- Merge request !6324Issue #3416723 by Ludo.R: Provide a "node type" views default argument β (Open) created by Ludo.R
- Status changed to Closed: works as designed
5 months ago 2:57pm 25 January 2024 - π§πͺBelgium Ludo.R Brussels
Totally agree, didn't know about this module, just tested it and it works for my use case.
Closing the issue.
- πΊπΈUnited States smustgrave
Also was not aware of that module. Thanks @Lendude!