Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The method doc is incorrect on the form of the compound key in addArgumentArray().
PastEventInterface:
* The key for each will consist of the $key_prefix_$array_key
But PastEvent uses ':'
Proposed resolution
Update method doc in interface.
Maybe even allow to pass a custom delimiter as parameter?
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#8 | add_argument_array-2674820-8.patch | 3.5 KB | Ginovski |
| |||
#8 | interdiff-2674820-4-8.txt | 3.35 KB | Ginovski |
#7 | add_argument_array-2674820-7.patch | 3.5 KB | Ginovski |
| |||
#7 | interdiff-2674820-4-7.txt | 0 bytes | Ginovski |
#4 | add-argument-array-2674820-4.patch | 3.46 KB | Ginovski |
|
Comments
Comment #2
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedAdded a delimiter as an argument and changed the method doc.
Comment #3
tduong CreditAttribution: tduong at MD Systems GmbH commentedNice work :)
Some nitpicks:
I think we can also assign a default value to this delimiter, since it used ':' then this should be the default (?).
And probably better to have it as the last param.
Then the param doc should be helpful for the ones that read it, so you need to specify the default value here as well.
Better
$key_prefix . $delimiter . $array_key
.Also missing ending sentence dot :)
And don't forget to assign the issue to yourself! ;)
Comment #4
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedComment #5
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedComment #6
tduong CreditAttribution: tduong at MD Systems GmbH commentedCool, coolcoolcoolcool! *abed style* :)
Just some code style things xd
Since we are touching these lines, we can also do that small code style thingy about the array syntax :D
argh, 81 chars xd
Maybe better something like "The key for each will consists of '$key_prefix . $delimiter . $array_key'."
Needs a white line between @params and @return :)
Comment #7
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedFixed the code style and changed array() to [].
Comment #8
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedLast interdiff was empty, ignore comment #7.
Comment #9
tduong CreditAttribution: tduong at MD Systems GmbH commentedActually I meant only the function line, but I guess this won't hurt that much as unrelated change (?)
I think it's fine.
I guess is ready now. Waiting for the maintainers review :)
Comment #10
BerdirUpdating the issue title.
@tduong is sneaking in some array() conversions in again, I see.. ;)
Comment #11
BerdirComment #13
tduong CreditAttribution: tduong at MD Systems GmbH commented@Berdir: it hurts so much, need to clean everything! .. xd
btw, after this comment about "allow grammar syntax", i pay more attention on it.. ^^'