Custom Event attribute with controller

I’m struggling to find a solution to this and wondering if anyone can point me in the right direction real quick.

I’m trying to create a custom attribute (actually extend a text attribute) for a calendar event, much like is done with core [page attributes (see this link)](here: but as part of a calendar.). The attribute would be included as part of a package. However, i can not figure out how to install and or namespace it property.

The proof of success would be that my custom attribute shows up in the calendar event attribute list to add to an event…or maybe even i could add it upon package installation.

Can anyone point me in the right direction?

OK…i found the answer to my problem by tracing through the routines called when you add an attribute through the ui by using chrome developer tools.

Effectively, the rules for creating the attribute are identical…except for when you get the category entity, you pass “event” to it instead of “collection”:
ex: $categoryEntity=$service->getByHandle(“event”);

1 Like