Lots of good stuff comes from supporting Entity module's property info, but the main one for me is that some code I'm writing now and get and set the metadata of a node programmatically nice 'n' easy!

Patch to follow.

Comments

jamsilver’s picture

Assigned: jamsilver » Unassigned
Status: Needs work » Needs review
FileSize
3.07 KB
PASSED: [[SimpleTest]]: [MySQL] 15 pass(es). View

Patch attached.

jamsilver’s picture

FileSize
3.19 KB
PASSED: [[SimpleTest]]: [MySQL] 15 pass(es). View

Ah OK - here's one which has sensible descriptions on the properties.

jamsilver’s picture

FileSize
3.23 KB
PASSED: [[SimpleTest]]: [MySQL] 15 pass(es). View

And finally - one that actually works =p

DamienMcKenna’s picture

Status: Needs review » Needs work

Interesting idea. Could you please extend this to at least cover all of the meta tags from the main module? Thanks.

Dave Reid’s picture

Yeah, this cannot be committed as-is having the list of meta tags hardcoded. This needs to retrieve available meta tags from the API.

tauno’s picture

Version: 7.x-1.0-alpha8 » 7.x-1.x-dev
Issue summary: View changes
FileSize
2.36 KB
PASSED: [[SimpleTest]]: [MySQL] 101 pass(es). View

Re-worked to not hardcode the list of metatags that are available. One @todo is noted in the patch still. The property is being added to all entities instead of just entities where metatags are enabled because metatag_entity_supports_metatags() isn't returning the correct result inside metatag_entity_property_info_alter().

Needs more work.

DamienMcKenna’s picture

Status: Needs work » Needs review
DamienMcKenna’s picture

FileSize
2.37 KB
PASSED: [[SimpleTest]]: [MySQL] 101 pass(es). View

Rerolled. Should this be moved into a separate file?

DamienMcKenna’s picture

FileSize
2.4 KB
PASSED: [[SimpleTest]]: [MySQL] 101 pass(es). View

Does this work too?

DamienMcKenna’s picture

Status: Needs review » Needs work

Needs to be updated to check against metatag_entity_supports_metatags().