Hi again.
I have a block that creates a calendar event. I need to also set a topic attribute upon creation. It doesn’t seem to use the same process as setting a page attribute.
$event = Event::getByID($eventID);
$item0 = TopicTreeNode::getNodeByName('Room 1 Queen');
$event->setAttribute('room_type', array($item0->getTreeNodeDisplayPath()));
I get an error that setAttribute was called on NULL.
Any thoughts on what I am doing wrong?
EDIT
So I found a reference to how to get the Event object so that explains why I was getting the error of setAttribute on NULL
$app = \Concrete\Core\Support\Facade\Application::getFacadeApplication();
$service = $app->make(EventOccurrenceService::class);
$occurrence = $service->getByOccurrenceID($eventID);
but the setAttribute call still doesn’t do its thing… no errors or anything, it just doesn’t set the attribute.