Core does this for nodes:
- type: the array of data
- type: the machine string
- name: the human string
We're doing this:
- type: the array of data
- name: the machine string
- label: the human string
I like using type to mean the array. It's clear.
Using type for the machine string is bad, as when you have $types keyed by machine string, what do you say? foreach ($types as $type => $type) !?!?!
Using label for the human name is clear.
I'm less sure about using name for the machine string. I'd like id... but does that cause ambiguity too?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 631192.profile2.change-name-to-type-aaaargh.1.patch | 18.83 KB | jp.stacey |
| #3 | 631192.profile2.change-name-to-type-aaaargh.patch | 18.83 KB | joachim |
Comments
Comment #1
fagoYes, imho id as ambigous with the identifier in the db, which is often not the same thing as the name. So I'm in favour of using 'name' is the machine readable name.
nitpicking: type is an object now, for nodes and profile2 ;)
Comment #2
joachim commentedCPH!
type and label. :)
Comment #3
joachim commentedThis is a patch on the head of my own git branch.
Comment #4
jp.stacey commentedPatch from #3 re-rolled with some bugfixes: attached.
Comment #5
joachim commentedThanks!!! :D
#631192 by joachim, jp.stacey: Changed name property of profile types to be consistent with core.