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?

Comments

fago’s picture

Yes, 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 ;)

joachim’s picture

Version: » 7.x-1.x-dev

CPH!

type and label. :)

joachim’s picture

Status: Active » Needs review
StatusFileSize
new18.83 KB

This is a patch on the head of my own git branch.

jp.stacey’s picture

Patch from #3 re-rolled with some bugfixes: attached.

joachim’s picture

Status: Needs review » Fixed

Thanks!!! :D

#631192 by joachim, jp.stacey: Changed name property of profile types to be consistent with core.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.